Fix issue with PhpFpm Application Deployed on Kubernetes is not working



Another challenging task on KodeKloud was the “Fix issue with PhpFpm Application Deployed on Kubernetes.” Initially, it seemed simple, but it ended up taking me almost 5 days to complete. I eventually decided to skip it when I realized that the information provided by KodeKloud and the checking mechanism were not functioning correctly.

Here’s an overview of the steps I followed for this task:

  1. First, I used the “get” command to check the status of all the services, configmaps, pods, and deployments. Everything appeared to be fine.
  2. The task required me to use the default nginx port on the service, so I edited the service configuration accordingly. Although the external IP was still pending, I proceeded with the change and set the port to 80.
  3. Next, I examined the configmap to ensure the correct name was used. I then edited the deployment to reflect the updated configmap name.
  4. Finally, I attempted to copy a file using the command kubectl cp /tmp/index.php nginx-phpfpm-dp-b848747b9-62248:/var/www/html -c nginx-container. I verified its success by executing a command and confirming that port 30008 was accessible, as evidenced by my screenshot. However, despite these efforts, I encountered the same error.
    I also encountered difficulties with the review button, which prevented me from submitting my work. This issue may be related to the fact that this was my second review attempt.

In the config file, I encountered entries such as index, index.htm, index.ph p, and possibly others that I can’t recall at the moment. I proceeded to copy and verify the presence of index.php in both containers. Additionally, I made the necessary modification to change index.ph p to index.php. However, the service’s load balancer has been in a pending state for several minutes. This delay is likely the main reason why it doesn’t display any information or provide an external IP to access the designated port. It’s interesting to note that I followed all the required steps diligently. I even attempted to submit a review for the second time, but unfortunately, the system doesn’t allow it.