This lab article introduces Kubernetes deployments and guides through the process of setting up and validating deployments in a cluster.
In this lab article, you will be introduced to Kubernetes deployments. We will walk through each step of the process while ensuring that your cluster is correctly set up and that deployments function as expected.
Because none of the four pods are in a ready state, you need to identify which image they are trying to pull. Run the following command to display detailed information for one pod:
Copy
Ask AI
kubectl describe pod frontend-deployment-7fd8cdb696-stmbx
From the output, notice that the specified image is busybox:888. Since this image does not exist, the pods are unable to reach a ready state.
The image name must be valid and available in your container registry. Verify the image tag before deployment to avoid issues like ImagePullBackOff.
Error from server (BadRequest): error when creating "deployment-definition-1.yaml": deployment in version "v1" cannot be handled as a Deployment: no kind "deployment" is registered for version "apps/v1" in scheme "k8s.io/apimachinery/v1.23.3-k3s1/pkg/runtime/scheme.go:100"
To ensure all deployments are functioning, validate by checking that all created deployments are running and the pods are in a ready state. This confirms that your environment is correctly configured and operational.This concludes the lab article on Kubernetes deployments. In upcoming labs, you’ll explore additional Kubernetes functionalities to further enhance your skills.