Fix Python App Deployed on Kubernetes Cluster Kodekloud

 

 

Question:  One of the DevOps engineers was trying to deploy a python app on Kubernetes cluster. Unfortunately, due to some mis-configuration, the application is not coming up. Please take a look into it and fix the issues. Application should be accessible on the specified nodePort.

The deployment name is python-deployment-devops, its using poroko/flask-demo-appimage. The deployment and service of this app is already deployed.

    nodePort should be 32345 and targetPort should be python flask app's default port.

Note: The kubectl on jump_host has been configured to work with the kubernetes cluster.


Solution:

At first check the image name in deployment and replace the incorrect image name by correct one according to question

kubectl edit deployment python-deployment-devops

Check the port also. Here it is 5000

After coreecting the image name, check the service and port

kubectl edit svc 

Replace  all 8080 port by 5000 port. 

Check the pod status and click the APP button from right side to check the app.




Share on Google Plus

About Ashadullah Shawon

I am Ashadullah Shawon. I am a Software Engineer. I studied Computer Science and Engineering (CSE) at RUET. I Like To Share Knowledge. Learn More: Click Here
    Blogger Comment
    Facebook Comment

0 comments:

Post a Comment