Fix issue with PhpFpm Application Deployed on Kubernetes

Hi @rahul456 @Inderpreet @Tej-Singh-Rana

I’ve been trying to complete this task but it looks like it has some validation issues or generally buggy with something else.

Link to Open Review: KodeKloud Engineer | Real Project Tasks on Real Systems

I noticed that I’m unable to access the website via nodePort 30008 even when the deployment and service configurations (ports, node ports, labels) are verified to be correct. I can the expected page from within the pod.

However, when I restart the deployment I am then able to access the website even though what I see is a WordPress install page instead of an Nginx Welcome Page as specified in the task description. I notice that there’s an index.html file originally present that disappears when I restart the deployment hence the reason I see WordPress when I restart. This index.html appears to contain the Welcome to Nginx content.

When I tried submitting with the hope that it can possibly fail and let me know what is wrong, it just refuses to validate. It ran for about 5 minutes and then returned to the scenario page without showing any success or fail. However after a couple of minutes, it shows This quiz portal has lost connectivity with the terminal session. And then on my profile, it shows the task marked as failed without offering any reason for failure.

Could you please look into this for me as soon as possible?

Many thanks

@dcmexy Thanks for the information. I might be having similar issue.

check with pod ip adress and nginx port…u get that pod ipadress from kubectl describe pods…
try it…

@mmumshad @Inderpreet @Tej-Singh-Rana @rahul456, can we get some help here please…

@dcmexy, this could be temporary network issue, this is marked pending for you, please give it an another try.

@rahul456,

Thank you for attending to this.

However, the problem I had yesterday is still there. The website only becomes accessible when deployment is restarted forcing the one index.html to disappear. It shows a Wordpress install page as opposed to an Nginx welcome page as stated in the task description.

It failed to validate after submission and subsequently marked the task as failed. Should I assume that the task is complete like this?

@rahul456,

I submitted and it failed with the following error: Nginx is not working on port 80. In this case I explicitly added a containerPort 80 to the nginx container.

Please see open review: KodeKloud Engineer | Real Project Tasks on Real Systems

@dcmexy Please le me know how you restarted the deployment? I am struggling with this same task

@Chudo you can restart deployment with this command

kubectl rollout restart deployment nginx-phpfpm-dp.

1 Like

I’ve applied containerPort: 80 too, and facing the same error message (and the same html page display), and looking for idea how the service should be exposed.

@mmumshad @Inderpreet @Tej-Singh-Rana @rahul456, can we get some help here please…

Hello, @dcmexy
No doubt, YES. Please be patience.

I have checked in the “Review” section, you’ve already got a solution from other community members. Please analysis and try again.

@Tej-Singh-Rana,

There’s nothing in the suggestions that I hadn’t previously tried out. If you able to access the comments/video of my first attempt, you would see that I checked all that out. So I’m confident it wasn’t a configmap/Nginx config issue at all because I checked it out too.

What is consistent in all my attempts is that testing through the browser via port 30008 would not work unless the deployment gets updated/restarted. In my first attempt, it couldn’t even validate at all.

@mmumshad @Inderpreet @Tej-Singh-Rana @rahul456

It’s almost 5 days now and I’m still stuck with this task. If this is not going to get looked at by anybody, could a new task be assigned to me please. This is the only task I’ve got this whole week.

And just out of curiosity, has anyone been able to pass this task lately?

@dcmexy, sorry for the issue, this is marked success for you.

Hi @rahul456,

Please check again… Not marked success…

@dcmexy, please logout and then login again.

Something is definitely not right with this task… Please see the attached gif. It shows what happens when I try to validate… It resets and subsequently marks the task as failed.

kke

Thank you @rahul456. It is now marked success but I ended up getting only half the points. Also, I lost a whole week on this task, is it possible to get a new task any sooner?