So ultimately what will happen, is everything will work fine, sometimes for days. However, once in a while when I do a deployment of my code (all contained within it's own Docker container, with the images stored on Dockerhub) it will cause Kubernetes to crash, which causes everything else to crash. I haven't been able to figure out any rhyme or reason to it. And for the most part, I've yet to find anything that actually helps fix the issues. Usually, it just starts working again for whatever reason - though I know at least once I deleted the whole instance group and started over. Which worked.
Now, when I do a deployment, all I do is run the kubectl set image deployment
command. Which works most of the time, just once in a while weird stuff happens.
Now, more specifically the weird stuff that happens is if I try to go to https://<master node>/ui
I will get an error like this:
{
"kind": "Status",
"apiVersion": "v1",
"metadata": {},
"status": "Failure",
"message": "no endpoints available for service \"kubernetes-dashboard\"",
"reason": "ServiceUnavailable",
"code": 503
}
This is the output of kubectl cluster-info
Kubernetes master is running at https://104.198.207.42
GLBCDefaultBackend is running at https://104.198.207.42/api/v1/proxy/namespaces/kube-system/services/default-http-backend
Heapster is running at https://104.198.207.42/api/v1/proxy/namespaces/kube-system/services/heapster
KubeDNS is running at https://104.198.207.42/api/v1/proxy/namespaces/kube-system/services/kube-dns
kubernetes-dashboard is running at https://104.198.207.42/api/v1/proxy/namespaces/kube-system/services/kubernetes-dashboard
and half way through writing this it magically started working again, so I can't really paste any more output (or, I don't know where to look for it, at least).
But if anyone has any ideas about what is causing this and how I can try and fix it next time it happens that would be amazing. It's extremely frustrating that a deployment can randomly break things and cause me hours of downtime while I try aimlessly and seemingly pointlessly to fix it. Just to have it randomly decide to work again.
Thanks for reading!