Ravindra BagaleCourses & study guides मराठी

DevOps

Chapter 66: Docker and Kubernetes Together: Dockerfile to Registry to Cluster, Jenkins and Kompose

Take one app: write a Dockerfile, build the image, push it to a registry and deploy it on Kubernetes. Then automate that flow in a Jenkins pipeline and convert a docker-compose file to Kubernetes YAML with Kompose. This chapter makes Docker and Kubernetes work together clear.

What you will learn in this chapter

  • Write a production-ready multi-stage Dockerfile for one real app
  • Tag images with versions and digests and push them to a local registry, Docker Hub and Amazon ECR
  • Pull private images in Kubernetes with imagePullSecrets and load images into kind
  • Deploy the image with a Deployment, Service, ConfigMap, Secret and probes
  • Automate build, test, push and deploy with a Jenkins pipeline
  • Convert a docker-compose file to Kubernetes manifests with Kompose and fix what it misses

Concepts in this chapter

  1. 66.1The app and its Dockerfile: from source code to a small, safe image
  2. 66.2Tag and push: local registry, Docker Hub and Amazon ECR
  3. 66.3Deploy the image to Kubernetes: config, secrets, probes and pull secrets
  4. 66.4Jenkins pipeline: build, test, push and deploy to Kubernetes
  5. 66.5Kompose: convert docker-compose.yml to Kubernetes and fix what it misses

The chapter recap is at the end of the last concept page.