datawire / envoy-steps

Envoy Step by Step
Apache License 2.0
75 stars 36 forks source link

Unable to start usersvc when running minikube with xhyve #3

Open cmpaul opened 6 years ago

cmpaul commented 6 years ago

It looks like there may be some issues running through this demo with minikube (v0.24.0) and kubectl (v1.8.4), particularly when using xhyve on MacOS. I'm able to run it successfully with VirtualBox.

The first problem I encounter (which I can fix) is:

> bash up.sh postgres
error: error validating "postgres/deployment.yaml": error validating data: unknown object type schema.GroupVersionKind{Group:"extensions", Version:"v1beta1", Kind:"Deployment"}; if you choose to ignore these errors, turn validation off with --validate=false

I took the error message's advice and added --validate=false to up.sh, and now the postgres service will start, but when I try to start the usersvc, it hangs:

> bash up.sh postgres
deployment "postgres" created
service "postgres" created
> bash up.sh usersvc
Sending build context to Docker daemon  16.38kB
Step 1 : FROM dwflynn/envoy-debug:20170501
Pulling repository docker.io/dwflynn/envoy-debug
Error while pulling image: Get https://index.docker.io/v1/repositories/dwflynn/envoy-debug/images: dial tcp: lookup index.docker.io on 192.168.64.1:53: read udp 192.168.64.2:37426->192.168.64.1:53: read: connection refused
deployment "usersvc" created
service "usersvc" created
> minikube version
minikube version: v0.24.0
> kubectl version
Client Version: version.Info{Major:"1", Minor:"8", GitVersion:"v1.8.4", GitCommit:"9befc2b8928a9426501d3bf62f72849d5cbcd5a3", GitTreeState:"clean", BuildDate:"2017-11-20T19:11:02Z", GoVersion:"go1.9.2", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"7", GitVersion:"v1.7.5", GitCommit:"17d7182a7ccbb167074be7a87f0a68bd00d58d97", GitTreeState:"clean", BuildDate:"2017-09-18T20:30:29Z", GoVersion:"go1.8.3", Compiler:"gc", Platform:"linux/amd64"}
> minikube service --url usersvc
Waiting, endpoint for service is not ready yet...
cmpaul commented 6 years ago

Huh. Looks like this had something to do with my DNS configuration. Setting it to 8.8.8.8 allowed me to download the docker image and continue. See: https://github.com/docker/for-win/issues/716

Going to close this for now. Thanks!

cmpaul commented 6 years ago

Nix that, the DNS change was a red herring. I had opened a new terminal window, where I had lost my eval'd docker-env variables. So it looks like running eval $(minikube docker-env) is causing this to fail. I notice it's attempting to access docker.io on my DOCKER_HOST IP: ...lookup index.docker.io on 192.168.64.1:53: read udp 192.168.64.2:37426->192.168.64.1:53...

> minikube docker-env
export DOCKER_TLS_VERIFY="1"
export DOCKER_HOST="tcp://192.168.64.2:2376"
...
cmpaul commented 6 years ago

I've isolated the issue to using xhyve. This seems to work fine with Virtualbox, so I'll update the description.