The Pod is a single instance of an application. A pod is the smallest object that one can create in Kubernetes. To scale the application, new pods can be added to the node or new pods can be added to a new node. Pods have a one-to-one relationship with containers. A single pod can have multiple containers. Generally, these extra containers perform supporting tasks and are called helper containers or sidecar containers.
kubectl get pods
//list of pods
kubectl describe pod podname
//details of the pod
pod-defination.yml
apiVersion:
//POD=v1, Service=v1, ReplicaSet = apps/v1, Deployment = appsv1
kind:
//Type of object POD, Service, ReplicaSet, Deployment
metadata:
// its a dictionary
//name:, labels:->AppName
.name:
.lables:
....apps: AppName
....type: frontend
spec:
//information about the boject being created
. containers: //List/Array
....- name: imagename
.... image: image
kubectl apply -f pod.yaml
//creating a pod by writing a yaml file