Deploying a sample containerized application
In this section, we will be deploying one of the nginx deployments from the Kubernetes examples repository on our MicroK8s cluster setup, as follows:
kubectl apply -f https://k8s.io/examples/controllers/nginx-deployment.yaml
The following is the output after the execution of the preceding command. It indicates that there is no error in the deployment, and in the following steps, we can verify whether the deployment is successful using the get pods
command as follows:
Figure 15.21 – Sample application deployment
Check the status of the pods to verify whether the application has been deployed and is running as follows:
kubectl get pods -l app=nginx
The following is the output after the execution of the preceding command, which indicates that pods are created and that their status is Running
:
Figure 15.22 – Checking whether pods have a Running status
Great! We have...