0

Running the below commands...

k3d cluster create challenge2 --agents 3 -p "8080:80@loadbalancer

kubectl create deployment k3d-challenge2-agent-0 --image nginx:latest

... creates pods on the master node/control plane...:

default       k3d-challenge2-agent-0-7894df65f8-c2j6v   0/1    ContainerCreating   0        
  4s     <none>     k3d-challenge2-server-0   <none>           <none> 

... as indicated by the presence of k3d-challenge2-server-0.

Does anyone know why this happens and how to avoid it?

Thanks in advance

P....
  • 17,421
  • 2
  • 32
  • 52
LB-
  • 9
  • 3
  • I might be seeing something similar (new to Kubernetes). When I run a 'kubectl create deployment ...' it is creating pods automatically that aren't connected to a service and keep failing to run and I can't seem to delete. – FreakyDan Mar 04 '22 at 18:26
  • would ypu add output of this command: `for node in $(kubectl get node -oname);do echo "====${node}=====";kubectl describe $node |perl -0777 -nle '/(?s)(Allocated resources:.*overcommitted..\n)(.*)(?=Events:)/m;print $2' ;done` – P.... Mar 04 '22 at 19:19
  • 1
    also, for `kubectl describe node |grep -i taint` – P.... Mar 04 '22 at 19:20
  • At this moment I don't see that pods not created on agent nodes - you have created deployment with 1 replica. You can increase to 4 number of replicas, as number of your nodes `kubectl scale deployment/k3d-challenge2-agent-0 --replicas=4` and check where new pods will be deployed: `kubectl get po -o wide` – Andrew Skorkin Mar 07 '22 at 17:42

0 Answers0