Deploy Pods in Kubernetes Cluster KodeKloud Engineer Task Success

Ticker

6/recent/ticker-posts

Deploy Pods in Kubernetes Cluster KodeKloud Engineer Task Success

 Question : The Nautilus DevOps team is diving into Kubernetes for application management. One team member has a task to create a pod according to the details below:

1. Create a pod named pod-nginx using the nginx image with the latest tag. Ensure to specify the tag as nginx:latest

2. Set the app label to nginx_app, and name the container as nginx-container.

Note: The kubectl utility on jump_host is configured to operate with the Kubernetes cluster.




Please Note :-  Perform the below commands based on your question  server,  user name & other details might differ . So please read task carefully before executing. All the Best 👍

Solution:  

1. At first  kubectl  utility configure and working from jump server, run below commands

    kubectl get pods

    

2.  Create  nginx.yaml  file with all the parameters 

---

apiVersion: v1
kind: Pod
metadata:
name: pod-nginx
labels:
app: nginx_app
spec:
containers:
- name: nginx-container
image: nginx:latest


4.  Run below command to create pod

    kubectl create -f nginx.yaml

5.  Wait for  pods to get running status & get validate

    kubectl get pods 

    kubectl get pods --show-labels


6.  Click on Finish & Confirm to complete the task successful

Happy Learning!!!!

Post a Comment

0 Comments

Latest Posts

Ansible Ping Module Usage Level 2 Ansible KodeKloud Engineer Task Success