Kubernetes Assignment– 5
Kubernetes in DevOps
Basic Questions
- Install Jenkins inside Kubernetes using a Deployment and Service.
- Create a Jenkins pipeline that runs kubectl get pods inside the cluster.
- Configure a GitLab CI/CD pipeline that deploys a simple Pod to Kubernetes.
- Write a GitHub Actions workflow that applies a Deployment manifest to Kubernetes.
- Create a Blue-Green deployment with two versions of an nginx app (blue and green).
- Switch Service traffic from blue to green deployment.
- Roll back Service traffic from green to blue deployment.
- Deploy two versions of an app (v1 and v2) as a Canary release (10% to v2).
- Verify canary routing using kubectl logs to see requests distributed.
- Install Helm on your system and verify installation.
- Add the official Helm stable repository and list charts.
- Install an Nginx chart from Helm repository.
- Uninstall the Helm release for Nginx.
- Create a new Helm Chart skeleton using helm create myapp.
- Understand the Chart structure (templates, values.yaml, Chart.yaml).
- Package a Helm Chart into a .tgz archive.
- Install your custom Chart into Kubernetes.
- Upgrade your Helm release by changing values in values.yaml.
- Roll back your Helm release to a previous revision.
- Document the difference between Blue-Green vs Canary deployments.
Intermediate Questions
- Create a GitLab CI/CD pipeline with stages: build → test → deploy to Kubernetes.
- Configure GitHub Actions to deploy a Kubernetes app only on pushes to main branch.
- Integrate Jenkins with Kubernetes credentials to run kubectl commands.
- Automate Deployment scaling via Jenkins pipeline after a build completes.
- Implement a Blue-Green deployment using Deployments and a shared Service.
- Automate traffic switching between Blue and Green with a Jenkins pipeline.
- Implement a Canary deployment by splitting traffic 80% to v1 and 20% to v2.
- Use labels and selectors in Services to manage Canary traffic routing.
- Create a Helm Chart for a simple web app with Deployment + Service.
- Add environment variables to the web app via Helm values.
- Configure Helm Chart templates to allow changing replica count via values.yaml.
- Add a ConfigMap template to your Helm Chart and reference it in Pods.
- Add a Secret template to your Helm Chart and inject it into Pods.
- Create a Helm Chart for a two-service app: frontend and backend.
- Publish your Helm Chart to a private Helm repository.
- Deploy your custom Helm Chart from the private repository.
- Upgrade your Helm Chart with new values and test rolling updates.
- Roll back the Helm Chart deployment using helm rollback.
- Install a monitoring chart (e.g., Prometheus) from Helm repository.
- Document the use cases of Helm in CI/CD pipelines.
Advanced Questions
- Create a full Jenkins pipeline that builds an image, pushes it to a registry, and deploys it via Helm.
- Extend the pipeline to perform Blue-Green deployment automatically.
- Add automated rollback to the Jenkins pipeline in case of failed deployment.
- Create a GitLab CI/CD pipeline that performs Canary deployment with progressive rollout.
- Automate Canary traffic shifting from 10% → 50% → 100% using GitLab pipeline.
- Create a Helm Chart for a multi-container app (frontend + backend + database).
- Add liveness and readiness probes to your Helm Chart templates.
- Add resource requests and limits to your Helm Chart templates.
- Explore Kubernetes Operators: Write a note on how Operators extend Kubernetes functionality.
- Deliver a final hands-on project:
- Build a Helm Chart for a multi-container app (frontend + backend + DB)
- Deploy it via Jenkins/GitLab CI/CD
- Perform Blue-Green deployment → Shift traffic → Roll back if needed
- Add Canary strategy for gradual rollout
- Integrate monitoring (Helm chart Prometheus/Grafana) to observe deployments.