Deploy Nginx Web Server on Kubernetes Cluster

Hello, @nenadmiladin
You defined label in pod template, services, but in the main case, you didn’t define label in the deployment which caused task got failed.

This is a screenshot of the copied code, it must have been wrongly copied. The application works, it’s not that

It is not mentioned that the deployment should specifically also have the label.

App labels should be app: nginx-app and type: front-end .

I have put everywhere where it was needed and the application works.

@Inderpreet @kodekloud-support3 and @Ayman

Okay, I just shared my view. Because you didn’t attach the task description. So just evaluating what is the cause of failure.
KKE team will verify it.

@Inderpreet Kindly check this. I am not sure what I missed…

2020-09-15 19_01_51-KodeKloud - Engineer and 6 more pages - Ram - Microsoft​ Edge

2020-09-15 18_59_41-KodeKloud - Engineer and 5 more pages - Ram - Microsoft​ Edge

2020-09-15 18_58_34-KodeKloud - Engineer and 5 more pages - Ram - Microsoft​ Edge

hi @rahul456 @Inderpreet @player001…could you please check and update on the above post?

Hello, @ramnamy
If I am not wrong, You have to add label in the deployment metadata labels. Can you share the task image? It would be good to clear.

I am sorry I didn’t have task screenshot…
Thanks @Tej-Singh-Rana for your response.

But I am not sure why the label for deployment matter…

Deployments selects the pods from Pod’s Label

Service selects the pods from Pod’s Label

Is there any place deployment label is needed for this task?

I think i had the service and deployment up & running

Can this reassigned for me please?

rahul456 and inderpreet can reassign you this task. They will look into this if it’s possible.
I can’t assign you this task. If you have any issue with the task. You can write your thoughts in the “Improve this task” option which is available in the below the each tasks.

@ramnamy, sorry for the issue, this is marked pending for you, please give it an another try

@rahul456 Thanks, I completed the task. Will I receive a new task for today? or I have to wait for one more day?

@ramnamy, you should have new task in your bucket now.

HI guys @rahul456 @Inderpreet, I have got a failed validation message, it say "NodePort is not correct’ while I have it specified on the nginx-service.yml file. Please check.

The validation.

My configs

Cheers,
Salim

Hi @Salim . It is not a validation error. The targetPort sets the port on pod (vide kubectl explain service.spec.ports.targetPort). To set the nodePort you should’ve added an attribute nodePort in ports item.
The result of kubectl get service should be (note the PORT(S) column and compare it with your result)

You are correct @francilio, yes I see I have missed the nodePort entry. :anguished:

@Salim As per the question you were supposed to set nodePort value to “30011” but seems like you missed to define the same so a random port (30109) was picked instead of “30011”.

Yes @rahul456, I noticed the issue. my bad!

Hello

I got this task as failed. could you please help. its states container name is wrong… but i set the correct name. please help and advise

hi @sddsouza, seems like you have completed the task.

Thanks Rahul for your response. when i did it the second time , it worked. the issue now is that I lost points. is it possible to get the points added ? I lost 600 points… as the task was for 800 points i expected it to work so would have got 1200 points, but i have only 600 points…