The deploy of a service is generally done
exploiting the resource Deployment
It offers a further layer of abstraction over the pods
The deployment requires the cluster
to create and keep alive the pod
Should the pod fail (e.g. the associated worker node dies),
the presence of the deployment bring the cluster
to reschedule the pod
kubectl create RESOURCE_TYPE RESOURCE_NAME
create
In our case
kubectl create deployment NAME --image=CONTAINER_IMAGE
create deployment
Let us deploy our service again
but exploiting a deployment
kubectl create deployment nginx --image=nginx
deployment.apps/nginx created
kubectl get deployments
NAME READY UP-TO-DATE AVAILABLE AGE
nginx 1/1 1 1 42s
This required a related pod
kubectl get pods
NAME READY STATUS RESTARTS AGE
nginx-85b98978db-c87qt 1/1 Running 0 42s
Let us focus on column AVAILABLE, what does it stand for?