How to disable creation of mirror pods only?

Hello,

I have created a cluster with 1 master node and 2 worker nodes (on AWS) and they are connected together.

The problem is that I can’t create pods on both worker nodes.

kubectl get nodes & describe one of the worker nodes

When I try to create a pod I get the following message:

Error from server (Forbidden): pods “nginxpod” is forbidden: pod does not have “kubernetes.io/config.mirror” annotation, node “worker-2” can only create mirror pods

I have tried to look up on google for this matter but I have not much information (only this post but is not saying exactly how it solved the problem)

Hi @GeorgeVLT

I’ve never run into this issue myself, however the documentation you found, which is actually based on this github issue seems to be suggesting that you are using the kubelet’s credentials to try to create the pod.

Were you actually ssh-ed into worker-2 and running kubectl from there? If so, and it is using the kubeconfig file belonging to kubelet, then that may well be the issue.

You should be deploying workloads from a machine outside of the cluster that can see the kube-apiserver across the network, using the admin kubeconfig (if you’re the admin) or another one given to you by the cluster admin.

Hi @GeorgeVLT ,

Looks like your node isn’t healthy:

You may have to check if all required ports are open and your install log.

Thanks,
KodeKloud Support

I missed that @Vitor :smiley:

1 Like

NP mate, you cover me, I cover you! :smiley:

It has been a long day!