Pod is an atomic unit of k8s which contains Containers
Pod will have containers
In k8s every resource which we create needs a name
Writing Pod Manifests
Most of the k8s manifests have 4 sections (apiVersion, kind, metadata, spec) which will represent resource and desired state and there will a 5 section (status) which represents status (generated)
# Watch
kubectl get pods -w
# get more info
kubectl get pods -o wide
# describe resource
kubectl describe pod nginx-pod
# Get the the output in yaml format
kubectl get pod nginx-pod -o yaml
I want to run the following containers give me docker commands
alpine container with runs for 1 day docker run -d --name alptest alpine sleep 1d
mysql with root password, user , password and database docker run -d --name mysqltest -e MYSQL_ROOT_PASSWORD=test123 mysql:9