Kuberenetes deployed application can not execute swagger API

9/25/2020

I have deployed application on Kubernetes and the application has one post Rest api and that has Swagger API.

I have added network policy for the application to access it from out side. I could able to access the application and open swagger UI. But while executing the API I am getting error "TypeError: NetworkError when attempting to fetch resource". Looking at the few threads on Google it seems issue is with CORS. Has anybody encountered such issue and fixed it?

When I run the application on local everything worked fine and only on Kubernetes I am getting this error.

-- Sach
kubernetes
swagger
swagger-ui

0 Answers