Has anyone done GameofPod Voting?
All pods are running except:
db-deployment and worker:
Create new deployment. name: 'db-deployment' image: 'postgres:9.4' Volume Type: 'EmptyDir' Volume Name: 'db-data' mountPath: '/var/lib/postgresql/data' status: 'Running'
Create new deployment. name: 'worker' image: 'kodekloud/examplevotingapp_worker' status: 'Running'
Created successfully but not running as
Events: Type Reason Age From Message ---- ------ ---- ---- ------- Normal Scheduled 24m default-scheduler Successfully assigned vote/worker-68b67cc7d9-f2xnk to node01 Normal Created 23m (x4 over 23m) kubelet, node01 Created container worker Normal Started 23m (x4 over 23m) kubelet, node01 Started container worker Normal Pulling 22m (x5 over 24m) kubelet, node01 Pulling image "kodekloud/examplevotingapp_worker" Normal Pulled 21m (x5 over 23m) kubelet, node01 Successfully pulled image "kodekloud/examplevotingapp_worker" Warning BackOff 3m57s (x85 over 23m) kubelet, node01 Back-off restarting failed container
Hello, @Priti Talukder
need to define env field in database deployment:
env: - name: POSTGRES_HOST_AUTH_METHOD value: trust
Tried the image below with and without quotes, single quotes. Same error.
kubectl create deployment test --image=“kodekloud/examplevotingapp_worker”
The Deployment “test” is invalid: spec.template.spec.containers.name: Invalid value: “examplevotingapp_worker”: a DNS-1123 label must consist of lower case alphanumeric characters or ‘-’, and must start and end with an alphanumeric character (e.g. ‘my-name’, or ‘123-abc’, regex used for validation is ‘a-z0-9?’)
Underscore(_) is not a correct naming convention for container’s name. Try to replace it or remove it.
Please note snapshot showing the image name with the underscore. I don’t understand how the folks above managed to get it to work with the underscore. :
There is no issue with the image name. By default, the container name takes the image name.
So issue in the container name.
kubectl create deploy test --image=kodekloud/examplevotingapp_worker --dry-run -oyaml
Run above command and check in the container name.
By default, the container name takes the image name.
I hope the CKA exam does not have that kind of pitfalls…