🚀Deploying Pods in Kubernetes Made Easy

Deploy Pods in Kubernetes Cluster

📦 Deploy Pods in Kubernetes Cluster

This guide demonstrates how to deploy a basic HTTP server pod (httpd) inside a Kubernetes cluster using a simple YAML manifest.


✅ Task Overview

  • Create a pod named pod-httpd using the httpd image with the latest tag.

  • Label the pod with app: httpd_app.

  • Name the container inside the pod as httpd-container.


🧑‍💻 Steps to Deploy the Pod

1. Create a YAML manifest for the pod

Save the following content into a file named pod-httpd.yaml.

cat > pod-httpd.yaml <<EOF
apiVersion: v1
kind: Pod
metadata:
  name: pod-httpd
  labels:
    app: httpd_app
spec:
  containers:
    - name: httpd-container
      image: httpd:latest
EOF

📸 Sample YAML preview:

pod-httpd YAML

2. Apply the pod configuration

Run the following command to deploy your pod:

kubectl apply -f pod-httpd.yaml

📸 Applying the manifest:

kubectl apply

3. Verify the pod is running

Use this command to check the status of your pod:

kubectl get pods

📸 Verifying pod status:

kubectl get pods

🏷️ Tags

#k8s #pods #devops #kubernetes #yaml #httpd

Last updated