Sunday, July 24, 2022

Create Kubernetes Pod Definition using YAML

Pods are the smallest deployable units of computing that you can create and manage in Kubernetes. 

A Pod is a group of one or more containers, with shared storage and network resources, and a specification for how to run the containers. 

Below is a sample yaml file for creating pod.
       
# cat pod.yaml
apiVersion: v1
kind: Pod
metadata:
  name: web
  labels:
    role: myrole
spec:
  containers:
    - name: web
      image: nginx
      ports:
        - name: web
          containerPort: 80
          protocol: TCP
Run following command to create pod in your Kubernetes cluster
       
# kubectl apply -f pod.yaml

1 comment:

  1. https://ameliajohnss.blogspot.com/2024/01/unveiling-power-of-azure-devops.html
    https://ameliajohnss.blogspot.com/2024/01/navigating-devops-in-kubernetes.html
    https://ameliajohnss.blogspot.com/2024/01/unleashing-power-of-problem-solving.html
    https://ameliajohnss.blogspot.com/2024/01/navigating-future-of-devops-with.html
    https://ameliajohnss.blogspot.com/2024/01/mastering-azure-devops-comprehensive.html
    https://ameliajohnss.blogspot.com/2024/01/unveiling-devops-mystique-essential.html
    https://ameliajohnss.blogspot.com/2024/01/navigating-future-ai-and-devops.html

    ReplyDelete

Create Kubernetes ClusterIP Service Definition using YAML

A ClusterIP service is the default Kubernetes service. It gives you a service inside your cluster that other apps/pods inside your cluster c...