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 👍
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
---
kind: Pod
metadata:
name: pod-nginx
labels:
app: nginx_app
spec:
containers:
- name: nginx-container
image: nginx:latest
kubectl get pods
kubectl get pods --show-labels
6. Click on Finish & Confirm to complete the task successful
Happy Learning!!!!
0 Comments