ksonnet / ksonnet

A CLI-supported framework that streamlines writing and deployment of Kubernetes configurations to multiple clusters.
https://ksonnet.io/
Apache License 2.0
1.17k stars 175 forks source link

minikube environment #869

Open srfrnk opened 6 years ago

srfrnk commented 6 years ago

/kind feature

What happened: Using ksonnet with minikube. Created an evironment called 'dev'. The ./app.yaml file contains server: https://192.168.39.117:8443 but this IP changes when minikube is restarted.

What you expected to happen: Possible solutions: 1) Having a configurable IP for the app.yaml environment e.g. from environment variable that could be set up using minikube ip 1) Having a special ks env to specify a minikube env that would dynamically use minikube ip 1) Having minikube get a cmd line arg with IP to use (currently not supported - can't tell if it will - see 1 2 3)

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

minikube start
ks env add dev
minikube delete
minikube start
ks validate dev

ksonnet will not be able to connect to server.

Anything else we need to know?:

Environment:

GuessWhoSamFoo commented 6 years ago

Option 1 is currently possible by setting a new server IP ks env set dev --server=https://$(minikube ip):8443 assuming namespace, ports stay the same (but those are also configurable)

Can't do much about option 3. Option 2 sounds interesting but unlikely to happen imo

srfrnk commented 6 years ago

Thanx. That's a nice workaround. Would be better if this could be embedded into App.yaml instead so you would't have to run an extra cmd every time.

aknuds1 commented 6 years ago

I agree, it woud be useful to have support in ksonnet for getting the minikube URL automatically.