![Github Github](/uploads/1/2/5/5/125501642/287733080.jpg)
Expected behavior start kubernetes with docker for mac (edge version) Actual behavior Information Full output of the diagnostics from 'Diagnose & Feedback' in the menu A reproducible case if this is a bug, Dockerfiles FTW Page URL if thi.
. x I have tried with the latest version of my channel (Stable or Edge). x I have uploaded Diagnostics. Diagnostics ID: 459DBC40-39A7-4D1D-B2B6-8F7DE23F3F15 Expected behavior Start or restart Docker will start both Docker for Mac and Kubernetes Actual behavior Docker starts but Kubernetes reports 'Kubernetes is starting.' Forever Information. macOS Version: 10.13.5 Diagnostic logs Note that a Console display of Docker logs shows the continuous adding of a error line 'com.docker.driver.amd64-linux Node status error: Unauthorized'``` Docker for Mac: version. 18.05.0-ce-mac67 (25042) (Edge) ### Steps to reproduce the behavior
Restart Docker or Reboot my Mac 2.Docker starts but Kubernetes never starts - reports 'Kubernetes is starting.' I had the same issue. I solved it by quitting Docker, then moved the Docker.qcow2 disk image out of $HOME/Library/Containers/com.docker.docker/Data/com.docker.driver.amd64-linux/, restarted Docker which spawned a new disk image and within a minute or so Kubernetes was showing as running again. NB: make sure your existing containers are writing to explicitly defined volumes if you require persistent storage before doing this. Upon restart Docker will need to pull down the images again so make sure you've got any important data backed up. For me this was not a concern (thankfully).
Expected behavior When I run a Kubernetes NodePort (or LoadBalancer) service, I can reach the service, probably via the host-exposed port on localhost; that is, if kubectl get services says it is a NodePort service on ports 80:31234/TCP, I can curl Actual behavior The service starts fine and I can reach it from within the cluster via every expected route, but there's no way to access it from the host. I've been having similar issues, my current workaround is to use kubectl port-forward to access services within the cluster. The 'service' layer seems to be unusable from the mac host, be it via ClusterIP, NodePort, or LoadBalancer.
The video here shows Elton using a service of type LoadBalancer, and it actually grabs a LoadBalancer IP, and he is able to hit the service a said IP: I've tried replicating his procedure to no avail. So, yea, for now I'm doing the port-forward workaround to hit the port on the pod itself.
This workaround doesn't address how you'd hit a deployment with more than 1 pod (i.e. Multiple replicas). From what I can tell, the only way to expose ports is to use a service of type LoadBalancer, and this causes the port to be forwarded from all of the host's interfaces. That means you can't run anything on the same port on the host — you can't have Postgres running on the host and under Kubernetes if they have the same port. That is a problem. It's also weird that Kubernetes stuff becomes available on all the host's interfaces.
Surely localhost is sufficient. In fact, by binding to everything it also bypasses the Mac firewall (see issue ), allowing anyone to connect to exposed LoadBalancer IPs. That is also a problem.
Why doesn't DFM expose the cluster IPs to the host, so that I can talk directly to, say, 10.104.2? Is there an issue for this?
That gist doesn't seem to work for me. I am able to connect to the lb service on port 8181 on osx via localhost, but not to the np service on 8282. ➜ kubectl get services NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE lb LoadBalancer 10.96.65.180 localhost 8181:31642/TCP 1m np NodePort 10.100.250.201 8282:30342/TCP 1m ➜ curl localhost:8181 Hello world% ➜ curl localhost:8282 curl: (7) Failed to connect to localhost port 8282: Connection refused ➜ Looks like the np port defined in the yaml is not being exposed. The np port displayed as opened by the service is exposed though: ➜ containers curl localhost:30342 Hello world% ➜ Why can't I connect to np port 8282 on localhost?