Continuous Deployment using Kubernetes
by Arun Veeramani
DevOps & AI - Product Engineer
Cognizant Accelerator – Cognizant Product Division
Few JARGONS to be familiar with
Definition Tools popularly used
Deployment • It is the process of putting a new application, or new version of an application,
onto a prepared application server
Containerization • It is the process of bundling up the application code along with the environment
needed for it to execute the code
• It is a one time Job
Docker, Vagrant
Provisioning • It is the process of creating the infrastructure or the servers themselves, usually
called ‘Infrastructure as Code’
• It is a one time Job
Terraform, CloudFormation
Container
Orchestration
• It is the process of arranging and coordinating multiple containers across a
cluster of servers as per the resource crunch
• It is a one time Job to Install the application and are then managed
automatically by the cluster
Kubernetes, Docker Swarm
Configuration
Management
• It is a process of installing and managing software on the existing servers
• It is a one time job to install the application
Chef, Puppet, Ansible, and
SaltStack
Package Manager • A package manager or package management system is a collection of software
tools that automate the process of installing, upgrading, configuring, and
removing computer programs for a computer's operating system in a consistent
manner
Helm, Ksonnet
The DevOps Lifecycle
https://www.oreilly.com/library/view/devops-for-web/9781786465702/ch01s02.html
Infrastructure
Provisioning
•Terraform
Application Provisioning
& Configuration
Management
•Ansible
•Chef
•Puppet
Application Deployment
& Orchestration
•Ansible
•Chef
•Puppet
Infrastructure
Provisioning
•Terraform
Application Provisioning
& Configuration
Management using
CONTAINERS & VMs
•Docker
•Vagrant + Packer
Application Deployment
& Orchestration
•Kubernetes
•Docker Swarm
Note:
• Vagrant: Tool for building VMs for Development Environment
• Vagrant Box: Base Images for Vagrant
• Packer: Tool for building Machine Images, can create Vagrant Boxes
• Docker: Tool for building Containers for Applications & Environments
• Terraform: Infrastructure as Code
Why Docker & Kubernetes? - The Workflow
Kubernetes is beyond Comparison
Support for Microservices Framework – Service Discover & Load Balancing
Horizontal Scaling – Automatically based on CPU
Self-Healing – Restarting or Rescheduling Containers that don’t respond
Batch Job Execution
Secret and Configuration Management
Continuous Delivery – Automated Rollouts and Rollbacks
Ingress – Manage external access to the Services in the Cluster (API Gateway)
Kubernetes is more of a
Framework to build any
Platform, rather than
just a tool for Continuous
Deployment
Building a CD pipeline for Kubernetes
A typical flow for Deploying
any new Application into
Kubernetes involves
• Package your application into a Docker Image
• Upload the Docker Image to a Container Registry (Harbor)
• Deploy your Application (YAML) to the Cluster
• Expose your Application as a Service
The problems that arises with
the above flow includes
• Deploying Large Scale Applications with Release Management
• Managing Deployment strategy across Team Members working on the same Deployment
• Managing Rollbacks of new and old Deployments
• Maintaining different versions of YAMLs for the same Application
The solution to such problems
involves “Automated
Management of the
Deployment Workflow”
• Using Package Manger like HELM to deploy Applications using Charts
• Using Workflow Engine like ARGO to deploy Applications as a Sequence of tasks
• Using Package Manager like KSONNET to deploy Applications as a JSON Manifests
Continuous Deployment using HELM
Install Helm
Define a Helm
Chart
Package the
Chart
Deploy the
Release
Upgrade /
Rollback / Delete
a Release
https://www.slideshare.net/AdnanAbdulhussein/kubernetes-cicd-with-helm
Continuous Deployment using ARGO CI/CD
Install
ArgoProject
Specify a Git
Repository as a
SOT for defining
Desired
Application State
(GitOps)
Commit your
Kubernetes
Manifest using
Helm Charts /
YAML in your Git
Repository
Run a CI Pipeline to
build and push you
Image into your
Image Repo using
ARGO CI / Jenkins
Run a CD Pipeline
to deploy your
Manifests into the
Environment
specified using
ARGO CD
https://argoproj.github.io/docs/argo-cd/readme.html

Continuous Deployment using Kubernetes

  • 1.
    Continuous Deployment usingKubernetes by Arun Veeramani DevOps & AI - Product Engineer Cognizant Accelerator – Cognizant Product Division
  • 2.
    Few JARGONS tobe familiar with Definition Tools popularly used Deployment • It is the process of putting a new application, or new version of an application, onto a prepared application server Containerization • It is the process of bundling up the application code along with the environment needed for it to execute the code • It is a one time Job Docker, Vagrant Provisioning • It is the process of creating the infrastructure or the servers themselves, usually called ‘Infrastructure as Code’ • It is a one time Job Terraform, CloudFormation Container Orchestration • It is the process of arranging and coordinating multiple containers across a cluster of servers as per the resource crunch • It is a one time Job to Install the application and are then managed automatically by the cluster Kubernetes, Docker Swarm Configuration Management • It is a process of installing and managing software on the existing servers • It is a one time job to install the application Chef, Puppet, Ansible, and SaltStack Package Manager • A package manager or package management system is a collection of software tools that automate the process of installing, upgrading, configuring, and removing computer programs for a computer's operating system in a consistent manner Helm, Ksonnet
  • 3.
  • 4.
    Infrastructure Provisioning •Terraform Application Provisioning & Configuration Management •Ansible •Chef •Puppet ApplicationDeployment & Orchestration •Ansible •Chef •Puppet Infrastructure Provisioning •Terraform Application Provisioning & Configuration Management using CONTAINERS & VMs •Docker •Vagrant + Packer Application Deployment & Orchestration •Kubernetes •Docker Swarm Note: • Vagrant: Tool for building VMs for Development Environment • Vagrant Box: Base Images for Vagrant • Packer: Tool for building Machine Images, can create Vagrant Boxes • Docker: Tool for building Containers for Applications & Environments • Terraform: Infrastructure as Code Why Docker & Kubernetes? - The Workflow
  • 5.
    Kubernetes is beyondComparison Support for Microservices Framework – Service Discover & Load Balancing Horizontal Scaling – Automatically based on CPU Self-Healing – Restarting or Rescheduling Containers that don’t respond Batch Job Execution Secret and Configuration Management Continuous Delivery – Automated Rollouts and Rollbacks Ingress – Manage external access to the Services in the Cluster (API Gateway) Kubernetes is more of a Framework to build any Platform, rather than just a tool for Continuous Deployment
  • 6.
    Building a CDpipeline for Kubernetes A typical flow for Deploying any new Application into Kubernetes involves • Package your application into a Docker Image • Upload the Docker Image to a Container Registry (Harbor) • Deploy your Application (YAML) to the Cluster • Expose your Application as a Service The problems that arises with the above flow includes • Deploying Large Scale Applications with Release Management • Managing Deployment strategy across Team Members working on the same Deployment • Managing Rollbacks of new and old Deployments • Maintaining different versions of YAMLs for the same Application The solution to such problems involves “Automated Management of the Deployment Workflow” • Using Package Manger like HELM to deploy Applications using Charts • Using Workflow Engine like ARGO to deploy Applications as a Sequence of tasks • Using Package Manager like KSONNET to deploy Applications as a JSON Manifests
  • 7.
    Continuous Deployment usingHELM Install Helm Define a Helm Chart Package the Chart Deploy the Release Upgrade / Rollback / Delete a Release https://www.slideshare.net/AdnanAbdulhussein/kubernetes-cicd-with-helm
  • 8.
    Continuous Deployment usingARGO CI/CD Install ArgoProject Specify a Git Repository as a SOT for defining Desired Application State (GitOps) Commit your Kubernetes Manifest using Helm Charts / YAML in your Git Repository Run a CI Pipeline to build and push you Image into your Image Repo using ARGO CI / Jenkins Run a CD Pipeline to deploy your Manifests into the Environment specified using ARGO CD https://argoproj.github.io/docs/argo-cd/readme.html