Question : The Nautilus development team has completed development of one of the node applications which they are planning deploy on a Kubernetes cluster. They recently had a meeting with the DevOps team to share their requirements. Based on the DevOps team has listed out the exact requirement to setup the cluster the same way. Fine below more details:
Create a namespace named node-namespace-nautilus.
Create a deployment named node-deployment-nautilus under this new namespace. Replica count should be 2, container should be named as node-container-nautilus, use gcr.io/kodekloud/centos-ssh-enabled:node image and container port should be 80.
Create a service named node-service-nautilus. Service type should be NodePort, target port should be 8080, port should be 80 and nodePort should be 30012.
Make sure all pods are in Running state after the deployment.
You can check the application page by clicking on + button on top left corner and clicking on Select port to view on Host 1, then enter your nodePort.
You can use any labels as per your choice.
Note: The kubectl on jump_host has been configured to work with the kubernetes cluster.
Please Note :- Perform the below commands based on your question server, user name & other details that might differ. So please read the task carefully before executing it. All the Best 👍
1. At first kubectl utility configure and working from jump server, run below commands
kubectl get namespace
kubectl get pods
2. create a new namespace
kubectl create namespace node-namespace-nautilus
https://gitlab.com/nb-tech-support/devops.git
( Refer Below Video for more clarity )
kubectl get deploy -n node-namespace-nautilus
kubectl get pods -n node-namespace-nautilus
6. Click on Finish & Confirm to complete the task successful
Happy Learning!!!!
0 Comments