Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable swagger-ui #1509

Closed
stevesloka opened this issue May 19, 2017 · 4 comments
Closed

Enable swagger-ui #1509

stevesloka opened this issue May 19, 2017 · 4 comments

Comments

@stevesloka
Copy link
Contributor

BUG REPORT

Minikube version (use minikube version): v0.19.0

Environment:

  • OS (e.g. from /etc/os-release): OSX
  • VM Driver (e.g. cat ~/.minikube/machines/minikube/config.json | grep DriverName): xhyve
  • ISO version (e.g. cat ~/.minikube/machines/minikube/config.json | grep -i ISO or minikube ssh cat /etc/VERSION): minikube-v0.18.0.iso
  • Install tools:
  • Others:

What happened:

Trying to enable the swagger-ui by passing flag to apiserver:

$ minikube start --memory=6144 --cpus=4 --vm-driver=xhyve --extra-config=apiserver.enable-swagger-ui=true 

What you expected to happen:

After proxying to kubeapi I should be able to open a browser and see swagger webpage at: http://localhost:8001/swagger-ui but the webpage only shows the api spec.

How to reproduce it (as minimally and precisely as possible):

Anything else do we need to know:

I tested this on a default cluster running in AWS and it worked. So not sure if just some small thing that's missing from localkube. I'm happy to send PR back to resolve!

@kmjohny
Copy link

kmjohny commented May 19, 2017

I got it to work on minikube v0.19.0 using the config key "Features.EnableSwaggerUI" like so.

minikube start --extra-config=apiserver.Features.EnableSwaggerUI=true

@stevesloka
Copy link
Contributor Author

Thanks @kmjohny!

@arashkaffamanesh
Copy link

The above didn't worked for me on minikube, http://localhost:8001/swagger-ui gives only some json, not the UI, installed the swagger on minkube as fowllow and it works:

kubectl run swagger-ui --image=swaggerapi/swagger-ui:latest
kubectl expose deployment swagger-ui --port=8080 --external-ip=$(minikube ip) --type=NodePort
http://192.168.99.100:8080/
192.168.99.100 is $(minikube ip)

@yanhongwang
Copy link

Hello all,

Does someone know how to enable swagger ui in Kubernetes cluster (not in minikube)?
Thanks.

Hong

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants