Create a namespace called hello-nginx
and a Pod in that namespace. Pod has the following properties:
my-pod
nginx:1.20.1
app=nginx
nginx
Create a Pod using the busybox
image. The Pod should write "Hello world" to the standard out and exit (stop running). Note the status of the Pod when running kubectl get pod
.
Create a deployment called helloworld
with 3 replicas. Deployment and the Pod template has two labels set:
app=hello
version=v1
There's a single container in the Pod that uses the busybox
image - you can run the following command when the container starts:
sh -c echo Hello World! && sleep 3600
When all Pods start, scale the deployment down to 1 replica.