Error with image in Deploy Voting App on Kubernetes task

Hi @rahul456 @Inderpreet @juliettet
I’ve assigned a task to deploy a Voting app in kubernetes and I am facing some image issues with the worker deployment.

Kindly find the screenshots attached for better clarification.


Hi @Ashu27

If you can please hare worker container logs that would be helpful to troubleshoot the issue.

Hey @Inderpreet
as I execute

kubectl get pods --namespace vote

For worker pod, it says

Crashloopbackoff

Then

Error

Try to find out the container logs, something like kubectl logs my-pod -c my-container

sure.

I’ll let you know after trying this.

Greetings @Inderpreet @juliettet @rahul456

Sorry for the delayed response.

But I am still facing the same issue.

Please have a look at below screenshots for more better understanding.


Hi @Inderpreet @rahul456 @player001 @akshayyw @juliettet

Any updates regarding the same?

Hi @Ashu27

Can you please send your yaml template you used to deploy this stack ?

Sure @Inderpreet

apiVersion: apps/v1
kind: Deployment
metadata:
  name: worker
  labels:
app: worker
spec:
  replicas: 1
  selector:
matchLabels:
  app: worker
  template:
metadata:
  labels:
    app: worker
spec:
  containers:
  - name: worker
    image: kodekloud/examplevotingapp_worker

Hi @Ashu27

I just noticed now that you have some components missing like database and result app. Please note that worker pod must be dependent on one of the other component, probably database, so make sure you deploy the entire stack.

Hi @Inderpreet

The question does not states that we need to add that too.

I’ve deployed the redis deployment and redis service too with application service and deployment!

But there’s nothing mentioned in the question somewhat like this that we need to connect them. :sweat_smile:

Hi @Ashu27

I wonder how you missed these details. Please check your own screen shot and you will see point number 6, 7, 8, 9 etc.

But as on KKE we always go with the flow, right? @Inderpreet
:sweat_smile:

I have started from 1 and done till 5th.

Not always, it depends upon the app or service you are deploying or testing.

1 Like

Hi @Inderpreet @juliettet @akshayyw @player001 @rahul456

Continuing the above thread, I am still facing the same issue!
I’ve created other deployments too, but still, the worker deployment is not up!

Please check the below screenshots!!


Hi @Ashu27,

Can you provide us a list (…in the order created) of all the resources that you have created?

Thanks:-)

Hey @juliettet
The order I followed to create the stack is as follows:

  1. Vote-deployement
  2. Vote-service
  3. Redis-deployement
  4. Redis-Service
  5. Woker (Failing and I moved on with Database)
  6. DB-deployement
  7. DB-Service (Here the worker needs to be up and running. But unfortunately, it was crashing!!)
  8. Result-deployement
  9. Result-service

Hi @Ashu27,

Sorry for the delayed response…had some things to do.

Did you remember to first create the namespace vote and add it to all of your resources? I don’t see it included in the list of steps that you have provided in your most recent post.

Also, are you sure that you are using the correct image for the worker deployment?

Cheers:-)

HI @juliettet
Yes, I’ve created the namespace named vote via “kubectl create namespace vote” and deployed everything in the same. On the other side, I’ve copied the exact name of the image from the question only.

Hi @Ashu27 ,

I forget…Did you run kubectl describe on the worker pod? I believe that you may have posted that above earlier in this thread. If so, what error(s) did you see?