Wednesday, 1 October 2025

Create Kubernetes Pod with httpd:latest | Step-by-Step Tutorial for Beginners

Your 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-httpd using the httpd image with the latest tag. Ensure to specify the tag as httpd:latest.

2. Set the app label to httpd_app, and name the container as httpd-container.


raj@jumphost ~$ cat abc.yaml

apiVersion: v1

kind: Pod

metadata:

  name: pod-httpd

  labels:

    app: httpd_app

spec:

  containers:

  - name: httpd-container

    image: httpd:latest

raj@jumphost ~$ 

raj@jumphost ~$ 

raj@jumphost ~$ kubectl apply -f abc.yaml 

pod/pod-httpd created

raj@jumphost ~$ kubectl get pod

NAME        READY   STATUS    RESTARTS   AGE

pod-httpd   1/1     Running   0          11s

thor@jumphost ~$ 


No comments:

Post a Comment