Create Pods in Kubernetes Cluster Kodekloud


Question: The Nautilus DevOps team has started practicing some pods and services deployment on Kubernetes platform as they are planning to migrate most of their applications on Kubernetes platform. Recently one of the team members has been assigned a task to create a pod as per details mentioned below:

    Create a pod named pod-nginx using nginx image with latest tag only and remember to mention the tag i.e nginx:latest.

    Labels app should be set to nginx_app, also container should be named as nginx-container.

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


Create the pod.yaml according to question

vi pod.yaml

apiVersion: v1
kind: Pod
name: pod-nginx
app: nginx_app
- name: nginx-container
image: nginx:latest

Then run 

kubectl apply -f pod.yaml

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


Post a Comment