In this lab, you'll create and understand the Kubernetes manifest for deploying the Thomasthornton.cloud app to Azure Kubernetes Service (AKS).
- Docker image created and stored in Azure Container Registry (ACR)
- Access to your AKS cluster
- Basic understanding of Kubernetes concepts
-
Understand the Manifest Components The Kubernetes manifest consists of three key components:
- Deployment: Manages the application's deployment within Kubernetes
- Service: Exposes the Kubernetes application for external access
- Namespace: Organises and isolates resources within the cluster
-
Locate the Manifest File Find the
deployment.yml
file in the4-kubernetes_manifest
directory. -
Update the Image URL Open
deployment.yml
and locate line 24. Update the image URL to match the image stored in your Azure Container Registry.
To ensure your manifest is correctly configured:
- Review the entire
deployment.yml
file for any syntax errors - Verify that the image URL matches your ACR repository
- Check that the resource requests and limits are appropriate for your application
After reviewing the manifest, consider these questions:
- What is the purpose of each component (Deployment, Service, Namespace) in the manifest?
- Why is it important to update the image URL in the manifest?
- How does the manifest help in managing your application in Kubernetes?
With your Kubernetes manifest prepared, you're ready to deploy your application to AKS. In the next lab, we'll cover how to apply this manifest to your cluster.
Consider using Helm charts for more complex applications. Helm allows you to template your Kubernetes manifests, making it easier to manage multiple environments or similar applications.