Question : There is an application that needs to be deployed on Kubernetes cluster under Apache web server. The Nautilus application development team has asked the DevOps team to deploy it. We need to develop a template as per requirements mentioned below:
Create a namespace named as httpd-namespace-nautilus.
Create a service named as httpd-service-nautilus under same namespace, targetPort should be 80 and nodePort should be 30004.
Create a deployment named as httpd-deployment-nautilus under the same namespace as mentioned above. Use image httpd with latest tag only and remember to mention tag i.e httpd:latest, and container name should be httpd-container-nautilus. And make sure replicas counts are 4.
Set labels app to httpd_app_nautilus.
Note: The kubectl utility on jump_host has been configured to work with the kubernetes cluster.
1. At first create a namespace as per the task
kubectl create namespace httpd-namespace-nautilus
kubectl get namespace
2. Create yaml file with all the parameters , you can copy form gitlab
https://gitlab.com/nb-tech-support/devops.git
( Refer Below Video for more clarity )
kubectl get pods
Happy Learning!!!!
7 Comments
Congrats on setting up a kubernetes web server that serves no content.
ReplyDeletehi
DeleteNice article. I appreciate it. Simple easy to understand!!
ReplyDeleteThanks @wahaj4311 for your kind words. Keep Learning
Deletewhat if I want my custom html pages with apache server ?
ReplyDeleteThis comment has been removed by the author.
Deleteyes you can do by adding in configmap html files path or post pod deploy
Delete