Kubernetes Assignment– 5

Kubernetes in DevOps

Basic Questions

  1. Install Jenkins inside Kubernetes using a Deployment and Service.
  2. Create a Jenkins pipeline that runs kubectl get pods inside the cluster.
  3. Configure a GitLab CI/CD pipeline that deploys a simple Pod to Kubernetes.
  4. Write a GitHub Actions workflow that applies a Deployment manifest to Kubernetes.
  5. Create a Blue-Green deployment with two versions of an nginx app (blue and green).
  6. Switch Service traffic from blue to green deployment.
  7. Roll back Service traffic from green to blue deployment.
  8. Deploy two versions of an app (v1 and v2) as a Canary release (10% to v2).
  9. Verify canary routing using kubectl logs to see requests distributed.
  10. Install Helm on your system and verify installation.
  11. Add the official Helm stable repository and list charts.
  12. Install an Nginx chart from Helm repository.
  13. Uninstall the Helm release for Nginx.
  14. Create a new Helm Chart skeleton using helm create myapp.
  15. Understand the Chart structure (templates, values.yaml, Chart.yaml).
  16. Package a Helm Chart into a .tgz archive.
  17. Install your custom Chart into Kubernetes.
  18. Upgrade your Helm release by changing values in values.yaml.
  19. Roll back your Helm release to a previous revision.
  20. Document the difference between Blue-Green vs Canary deployments.

Intermediate Questions

  1. Create a GitLab CI/CD pipeline with stages: build → test → deploy to Kubernetes.
  2. Configure GitHub Actions to deploy a Kubernetes app only on pushes to main branch.
  3. Integrate Jenkins with Kubernetes credentials to run kubectl commands.
  4. Automate Deployment scaling via Jenkins pipeline after a build completes.
  5. Implement a Blue-Green deployment using Deployments and a shared Service.
  6. Automate traffic switching between Blue and Green with a Jenkins pipeline.
  7. Implement a Canary deployment by splitting traffic 80% to v1 and 20% to v2.
  8. Use labels and selectors in Services to manage Canary traffic routing.
  9. Create a Helm Chart for a simple web app with Deployment + Service.
  10. Add environment variables to the web app via Helm values.
  11. Configure Helm Chart templates to allow changing replica count via values.yaml.
  12. Add a ConfigMap template to your Helm Chart and reference it in Pods.
  13. Add a Secret template to your Helm Chart and inject it into Pods.
  14. Create a Helm Chart for a two-service app: frontend and backend.
  15. Publish your Helm Chart to a private Helm repository.
  16. Deploy your custom Helm Chart from the private repository.
  17. Upgrade your Helm Chart with new values and test rolling updates.
  18. Roll back the Helm Chart deployment using helm rollback.
  19. Install a monitoring chart (e.g., Prometheus) from Helm repository.
  20. Document the use cases of Helm in CI/CD pipelines.

Advanced Questions

  1. Create a full Jenkins pipeline that builds an image, pushes it to a registry, and deploys it via Helm.
  2. Extend the pipeline to perform Blue-Green deployment automatically.
  3. Add automated rollback to the Jenkins pipeline in case of failed deployment.
  4. Create a GitLab CI/CD pipeline that performs Canary deployment with progressive rollout.
  5. Automate Canary traffic shifting from 10% → 50% → 100% using GitLab pipeline.
  6. Create a Helm Chart for a multi-container app (frontend + backend + database).
  7. Add liveness and readiness probes to your Helm Chart templates.
  8. Add resource requests and limits to your Helm Chart templates.
  9. Explore Kubernetes Operators: Write a note on how Operators extend Kubernetes functionality.
  10. 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.