kelseyhightower / kubernetes-the-hard-way

Bootstrap Kubernetes the hard way. No scripts.
Apache License 2.0
41.31k stars 14.13k forks source link

Include flag to authenticate with the kube-controller-manager kubeconfig #604

Closed dcoy closed 4 years ago

dcoy commented 4 years ago

While going through Deploying the DNS Cluster Add-on, I attempted to apply the coredns cluster add-on, but ran into an authentication issue on my controllers:

Oct 01 14:18:10 controller-0 kube-controller-manager[3945]: E1001 14:18:10.611587    3945 leaderelection.go:320] error retrieving resource lock kube-system/kube-controller-manager: endpoints "kube-controller-manager" is forbidden: User "system:anonymous" cannot get resource "endpoints" in API group "" in the namespace "kube-system"

Once I modified the service file to authenticate with the kube-controller-manager.kubeconfig file and applied to all 3 controllers, ran sudo systemctl daemon-reload, and restarted services (sudo systemctl restart kube-apiserver kube-controller-manager kube-scheduler), I was able to successfully continue with the guide.

Please let me know if you need more information.

dcoy commented 4 years ago

I'm not entirely sure what caused the issue I ran into, however after completing the tutorial again, I didn't run into this issue. I'll close this PR.