SlideShare a Scribd company logo
CI/CD with Kubernetes
Tech Talk @Lendingkart
Mihir, Rishabh
May 18th, 2019
CI/CD Introduction
Why CI/CD ?
What is CI/CD ?
How we accomplished ?
Why CI/CD: Initial Lendingkart Platform !
● Started with 2 Backend, 2 UI Developers, 1 QA
● As new developers joined the team, it was difficult to understand and
maintain the monolithic
● Initial monolithic catered to customer & ops with minimal features.
● Stability was a major worry as we had to deploy features and bugs on a
daily basis
● Vertical scaling of our database server on a regular basis
Why CI/CD: Monolith
● Lending involves 3 major pieces: Origination, Credit analysis, Loan
management
● Our initial monolithic involved Customer, Origination and Credit analysis
modules (Spring MVC) structured on the lines of SOA
● For Loan management we used a third party service to avoid re-inventing
the wheel
Why CI/CD: Monolith to Microservice Architecture
● First microservice was in the form of lead service , followed by notification
service
● Subsequent break of our monolithic to microservice happened in the form
of customer, credit analysis, audit, reports, scheduler, webhooks, etc
● The greatest advantage was that since our requirements were changing
fast, we could make the changes quickly on the microservice and make it
more mature over time
Why CI/CD: Typical Microservice Architecture
Why CI/CD: How We Moved to Microservices Architecture
Monolithic to Microservice architecture
UI
MySQL DB
Business logic
Data Access Layer
MySQL DB MongoDB MySQL
Microservice
Customer
Microservice
Ops
Microservice
Notification
Microservice
Credit Analysis
Nginx
UI UI UI UI
How We Broke Our Monolithic !
● Lead
● Audit
● Customer
● Schedulers
● Webhooks
● Search
● Authentication & Authorization
● Crypto
● Notifications
(Many more)
Problems in Existing Release & Deployment Cycle
● Too many releases every week. (Thanks to microservices!)
● Too many failures and rollbacks required manually.
● Failed machines, applications, deployments go unnoticed and would need manual intervention to
bring up.
● Too many machines to be managed and procured for the release by devops.
● Every new project/service need new infrastructure & automation.
● QA needs to understand different release process for different projects like spring mvc, spring
boot, node js, UI etc.,
● No standard way of releasing all the projects.
● Growing infrastructure cost due to individual machine/servers for each service/replicas.
What is CI/CD ?
How CI/CD works ?
Gitlab CI
Gitlab repository .gitlabci.yml RunnerGitlab CI
Gitlab CI is a
powerful tool
for
continuously
test and
deploy the
code.
It contains all the
configuration of
what CI will do
with your
repository.
Runner can be a
VM, docker
container or
cluster of
machines which
runs the jobs
that are defined
in gitlabci.yml.
Gitlab Container
Registry
Every project can have its own space to store its
Docker images. Build and push the images to
registry.
Sample gitlab-ci.yml file
Docker
A container is a standard unit of software
that packages up code and all its
dependencies so the application runs
quickly and reliably from one computing
environment to another.
ROI & Cost Saving
Immutable
Rapid Deployment
Standardization
Dockerfile
KOPS (kubernetes operations)
Kops is basically a Kubernetes project used to manage Kubernetes cluster to AWS.
To create K8s cluster you should have:-
- S3 Bucket
- IAM Permissions
- DNS
Important Commands:-
kops create cluster --name <cluster_name> --zones <zone> --state <s3_bucket> --yes
kops get clusters --state="s3://k8s-lkart-clusters"
kops validate cluster --state="s3://k8s-lkart-clusters"
kops edit ig nodes --state="s3://k8s-lkart-clusters"
kops delete cluster --name <cluster_name> --state="s3://k8s-lkart-clusters" --yes
Kops Advantages
● Deploy clusters to existing virtual private clouds (VPC) or create a new VPC from scratch
● Supports public & private network topologies
● Provisions single or multiple master clusters
● Configurable bastion machines for SSH access to individual cluster nodes
● Rolling cluster updates
● Supports heterogeneous clusters by creating multiple instance groups
Kubernetes to Rescue!
In broad term, “Kubernetes is orchestration layer which decouples your application deployments from
underlying infrastructure” !
Kubernetes: Features/Advantages
● Orchestration layer
● Decouple Infrastructure from Applications.
● Cluster management
● Service discovery
● Make better use of your hardware resources
● Scale containerized applications and their resources on the fly.
● Declaratively manage services, which guarantees the deployed applications are always running
how you deployed them
● Health-check and self-heal your apps with auto placement, autorestart, auto replication, and
autoscaling.
● Horizontal scaling.
● Rolling updates (zero downtime).
Kubernetes: Architecture replication controller,
endpoints controller,
namespace controller,
and service accounts
controller
Individual node
monitoring
Node agent to communicate
with masters & manage pod
metrics Network proxy for the
pods to communicate
Storage stack
for secrets,
definitions, state
of system
Kubernetes: Building Blocks
Kubernetes: Cluster Setup
TCP
AWS Cloud
ALB
NGINX
VPC
PEERING
Non K8s VPC
Private
Subnet
Private
Subnet
legacy-service
Pod
container
Pod
container
K8s VPC (Private subnet)
lkart-service sherlock-service
Ingress
ELB
nucleus-service
Pod
container
Pod
container
Pod
container
Pod
container
vendor-tools
Kubernetes:Deploying First Application!
Service
Expose application
ports
Bind ELB
ConfigMap/Secrets/PV
Environment variables
Passwords
Volume mounts
Deployment/Statefulsets
Deployment.yml
Ports
Docker images
Resources
Ingress
Routing rules
SSL
Host details.
Phase 1: Dockerize & Deploy
● Deployed containers on existing machines without any changes in network topology.
● Logs mounted to local disks.
Challenges:
● Memory leaks
● Incorrect containers dockerized.
● No profiling
● No resource limits
Phase 2: Critical Applications Migration to K8s
● Started dockerizing all services.
● Deployed & Stabilized the applications.
● Stabilization of cluster.
Challenges:
● Logs, disk full, temp data
● Stateful applications.
● Encryption till the container.
● Monitoring & Alerts
Phase 3: Standardisation of logs & tmp data management
Pod1 Pod2
Pod3 Pod4
Pod5 Pod6
Pod7 Pod8
Tmp files
PVC
Bigqueue
PVC
Logs PVC
Filebeat
Filebeat
Filebeat
Filebeat
/tmp PV
/var/log/l
endingka
rt PV
/data/bq
PV
NFS PVCs
Node
Daemonsets
Kubernetes cluster
Phase 3: Certificates Management
Namespace
Secretes
Ingress
Service 1
Service 2
POD 1
POD 2
POD 3
POD 4
SSL
termination
Phase 4: Migrating rest of applications to k8s
Internal ELB Public ELB
Sherlock audit consumer LkartWS Nucleus
... ...
Lead
Phase 5: QA Environment setup
1 2 3 4
Phase 6: Serverless
Auto scaling groups
K8s cluster nodes
● Serverless kubernetes engine
● Pod driven auto-scaling
● Heterogenous instance groups
● Cost effective
Demo

More Related Content

What's hot

Introduction to CICD
Introduction to CICDIntroduction to CICD
Introduction to CICD
Knoldus Inc.
 
Kubernetes Architecture | Understanding Kubernetes Components | Kubernetes Tu...
Kubernetes Architecture | Understanding Kubernetes Components | Kubernetes Tu...Kubernetes Architecture | Understanding Kubernetes Components | Kubernetes Tu...
Kubernetes Architecture | Understanding Kubernetes Components | Kubernetes Tu...
Edureka!
 
Hands-On Introduction to Kubernetes at LISA17
Hands-On Introduction to Kubernetes at LISA17Hands-On Introduction to Kubernetes at LISA17
Hands-On Introduction to Kubernetes at LISA17
Ryan Jarvinen
 
Introduction to Kubernetes Workshop
Introduction to Kubernetes WorkshopIntroduction to Kubernetes Workshop
Introduction to Kubernetes Workshop
Bob Killen
 
Modern CI/CD Pipeline Using Azure DevOps
Modern CI/CD Pipeline Using Azure DevOpsModern CI/CD Pipeline Using Azure DevOps
Modern CI/CD Pipeline Using Azure DevOps
GlobalLogic Ukraine
 
Fundamentals of DevOps and CI/CD
Fundamentals of DevOps and CI/CDFundamentals of DevOps and CI/CD
Fundamentals of DevOps and CI/CD
Batyr Nuryyev
 
Azure kubernetes service (aks)
Azure kubernetes service (aks)Azure kubernetes service (aks)
Azure kubernetes service (aks)
Akash Agrawal
 
Learn how to use Harbor
Learn how to use HarborLearn how to use Harbor
Learn how to use Harbor
Steve Wong
 
Devops - Microservice and Kubernetes
Devops - Microservice and KubernetesDevops - Microservice and Kubernetes
Devops - Microservice and Kubernetes
NodeXperts
 
Kubernetes Concepts And Architecture Powerpoint Presentation Slides
Kubernetes Concepts And Architecture Powerpoint Presentation SlidesKubernetes Concepts And Architecture Powerpoint Presentation Slides
Kubernetes Concepts And Architecture Powerpoint Presentation Slides
SlideTeam
 
Docker & kubernetes
Docker & kubernetesDocker & kubernetes
Docker & kubernetes
NexThoughts Technologies
 
CI/CD (DevOps) 101
CI/CD (DevOps) 101CI/CD (DevOps) 101
CI/CD (DevOps) 101
Hazzim Anaya
 
Continuous Delivery, Continuous Integration
Continuous Delivery, Continuous Integration Continuous Delivery, Continuous Integration
Continuous Delivery, Continuous Integration
Amazon Web Services
 
DevOps Interview Questions and Answers 2019 | DevOps Tutorial | Edureka
DevOps Interview Questions and Answers 2019 | DevOps Tutorial | EdurekaDevOps Interview Questions and Answers 2019 | DevOps Tutorial | Edureka
DevOps Interview Questions and Answers 2019 | DevOps Tutorial | Edureka
Edureka!
 
Docker Introduction
Docker IntroductionDocker Introduction
Docker Introduction
Peng Xiao
 
Kubernetes 101
Kubernetes 101Kubernetes 101
Kubernetes 101
Crevise Technologies
 
virtualization-vs-containerization-paas
virtualization-vs-containerization-paasvirtualization-vs-containerization-paas
virtualization-vs-containerization-paas
rajdeep
 
Continuous Delivery
Continuous DeliveryContinuous Delivery
Continuous Delivery
Mike McGarr
 
Automation CICD
Automation CICDAutomation CICD
Automation CICD
Lumban Sopian
 
DevOps with Kubernetes
DevOps with KubernetesDevOps with Kubernetes
DevOps with Kubernetes
EastBanc Tachnologies
 

What's hot (20)

Introduction to CICD
Introduction to CICDIntroduction to CICD
Introduction to CICD
 
Kubernetes Architecture | Understanding Kubernetes Components | Kubernetes Tu...
Kubernetes Architecture | Understanding Kubernetes Components | Kubernetes Tu...Kubernetes Architecture | Understanding Kubernetes Components | Kubernetes Tu...
Kubernetes Architecture | Understanding Kubernetes Components | Kubernetes Tu...
 
Hands-On Introduction to Kubernetes at LISA17
Hands-On Introduction to Kubernetes at LISA17Hands-On Introduction to Kubernetes at LISA17
Hands-On Introduction to Kubernetes at LISA17
 
Introduction to Kubernetes Workshop
Introduction to Kubernetes WorkshopIntroduction to Kubernetes Workshop
Introduction to Kubernetes Workshop
 
Modern CI/CD Pipeline Using Azure DevOps
Modern CI/CD Pipeline Using Azure DevOpsModern CI/CD Pipeline Using Azure DevOps
Modern CI/CD Pipeline Using Azure DevOps
 
Fundamentals of DevOps and CI/CD
Fundamentals of DevOps and CI/CDFundamentals of DevOps and CI/CD
Fundamentals of DevOps and CI/CD
 
Azure kubernetes service (aks)
Azure kubernetes service (aks)Azure kubernetes service (aks)
Azure kubernetes service (aks)
 
Learn how to use Harbor
Learn how to use HarborLearn how to use Harbor
Learn how to use Harbor
 
Devops - Microservice and Kubernetes
Devops - Microservice and KubernetesDevops - Microservice and Kubernetes
Devops - Microservice and Kubernetes
 
Kubernetes Concepts And Architecture Powerpoint Presentation Slides
Kubernetes Concepts And Architecture Powerpoint Presentation SlidesKubernetes Concepts And Architecture Powerpoint Presentation Slides
Kubernetes Concepts And Architecture Powerpoint Presentation Slides
 
Docker & kubernetes
Docker & kubernetesDocker & kubernetes
Docker & kubernetes
 
CI/CD (DevOps) 101
CI/CD (DevOps) 101CI/CD (DevOps) 101
CI/CD (DevOps) 101
 
Continuous Delivery, Continuous Integration
Continuous Delivery, Continuous Integration Continuous Delivery, Continuous Integration
Continuous Delivery, Continuous Integration
 
DevOps Interview Questions and Answers 2019 | DevOps Tutorial | Edureka
DevOps Interview Questions and Answers 2019 | DevOps Tutorial | EdurekaDevOps Interview Questions and Answers 2019 | DevOps Tutorial | Edureka
DevOps Interview Questions and Answers 2019 | DevOps Tutorial | Edureka
 
Docker Introduction
Docker IntroductionDocker Introduction
Docker Introduction
 
Kubernetes 101
Kubernetes 101Kubernetes 101
Kubernetes 101
 
virtualization-vs-containerization-paas
virtualization-vs-containerization-paasvirtualization-vs-containerization-paas
virtualization-vs-containerization-paas
 
Continuous Delivery
Continuous DeliveryContinuous Delivery
Continuous Delivery
 
Automation CICD
Automation CICDAutomation CICD
Automation CICD
 
DevOps with Kubernetes
DevOps with KubernetesDevOps with Kubernetes
DevOps with Kubernetes
 

Similar to CI/CD Pipeline with Kubernetes

The what, why and how of knative
The what, why and how of knativeThe what, why and how of knative
The what, why and how of knative
Mofizur Rahman
 
Ultimate Guide to Microservice Architecture on Kubernetes
Ultimate Guide to Microservice Architecture on KubernetesUltimate Guide to Microservice Architecture on Kubernetes
Ultimate Guide to Microservice Architecture on Kubernetes
kloia
 
Sumo Logic Cert Jam - Advanced Metrics with Kubernetes
Sumo Logic Cert Jam - Advanced Metrics with KubernetesSumo Logic Cert Jam - Advanced Metrics with Kubernetes
Sumo Logic Cert Jam - Advanced Metrics with Kubernetes
Sumo Logic
 
Slide DevSecOps Microservices
Slide DevSecOps Microservices Slide DevSecOps Microservices
Slide DevSecOps Microservices
Hendri Karisma
 
GCP Meetup #3 - Approaches to Cloud Native Architectures
GCP Meetup #3 - Approaches to Cloud Native ArchitecturesGCP Meetup #3 - Approaches to Cloud Native Architectures
GCP Meetup #3 - Approaches to Cloud Native Architectures
nine
 
Introduction to kubernetes
Introduction to kubernetesIntroduction to kubernetes
Introduction to kubernetes
Helder Klemp
 
Building Cloud-Native Applications with Kubernetes, Helm and Kubeless
Building Cloud-Native Applications with Kubernetes, Helm and KubelessBuilding Cloud-Native Applications with Kubernetes, Helm and Kubeless
Building Cloud-Native Applications with Kubernetes, Helm and Kubeless
Bitnami
 
Azure meetup cloud native concepts - may 28th 2018
Azure meetup   cloud native concepts - may 28th 2018Azure meetup   cloud native concepts - may 28th 2018
Azure meetup cloud native concepts - may 28th 2018
Jim Bugwadia
 
Introduction of Kubernetes - Trang Nguyen
Introduction of Kubernetes - Trang NguyenIntroduction of Kubernetes - Trang Nguyen
Introduction of Kubernetes - Trang Nguyen
Trang Nguyen
 
Cloud Native DevOps
Cloud Native DevOpsCloud Native DevOps
Cloud Native DevOps
Jim Bugwadia
 
Moving from Monolith to Microservices
Moving from Monolith to MicroservicesMoving from Monolith to Microservices
Moving from Monolith to Microservices
Mist.io
 
Kubernetes 101
Kubernetes 101Kubernetes 101
Kubernetes 101
Vishwas N
 
Azure Day Rome 2019 Reloaded - Strangle(r pattern) your legacy application ru...
Azure Day Rome 2019 Reloaded - Strangle(r pattern) your legacy application ru...Azure Day Rome 2019 Reloaded - Strangle(r pattern) your legacy application ru...
Azure Day Rome 2019 Reloaded - Strangle(r pattern) your legacy application ru...
azuredayit
 
2017 Microservices Practitioner Virtual Summit: Microservices at Squarespace ...
2017 Microservices Practitioner Virtual Summit: Microservices at Squarespace ...2017 Microservices Practitioner Virtual Summit: Microservices at Squarespace ...
2017 Microservices Practitioner Virtual Summit: Microservices at Squarespace ...
Ambassador Labs
 
The NRB Group mainframe day 2021 - Containerisation on Z - Paul Pilotto - Seb...
The NRB Group mainframe day 2021 - Containerisation on Z - Paul Pilotto - Seb...The NRB Group mainframe day 2021 - Containerisation on Z - Paul Pilotto - Seb...
The NRB Group mainframe day 2021 - Containerisation on Z - Paul Pilotto - Seb...
NRB
 
Kubernetes: від знайомства до використання у CI/CD
Kubernetes: від знайомства до використання у CI/CDKubernetes: від знайомства до використання у CI/CD
Kubernetes: від знайомства до використання у CI/CD
Stfalcon Meetups
 
Challenges In Modern Application
Challenges In Modern ApplicationChallenges In Modern Application
Challenges In Modern Application
Rahul Kumar Gupta
 
Making Cloud Native CI_CD Services.pdf
Making Cloud Native CI_CD Services.pdfMaking Cloud Native CI_CD Services.pdf
Making Cloud Native CI_CD Services.pdf
Rakuten Group, Inc.
 
Kubernetes for Beginners: An Introductory Guide
Kubernetes for Beginners: An Introductory GuideKubernetes for Beginners: An Introductory Guide
Kubernetes for Beginners: An Introductory Guide
Bytemark
 
KubernetesPPT.pptx
KubernetesPPT.pptxKubernetesPPT.pptx
KubernetesPPT.pptx
Ryuzaki360
 

Similar to CI/CD Pipeline with Kubernetes (20)

The what, why and how of knative
The what, why and how of knativeThe what, why and how of knative
The what, why and how of knative
 
Ultimate Guide to Microservice Architecture on Kubernetes
Ultimate Guide to Microservice Architecture on KubernetesUltimate Guide to Microservice Architecture on Kubernetes
Ultimate Guide to Microservice Architecture on Kubernetes
 
Sumo Logic Cert Jam - Advanced Metrics with Kubernetes
Sumo Logic Cert Jam - Advanced Metrics with KubernetesSumo Logic Cert Jam - Advanced Metrics with Kubernetes
Sumo Logic Cert Jam - Advanced Metrics with Kubernetes
 
Slide DevSecOps Microservices
Slide DevSecOps Microservices Slide DevSecOps Microservices
Slide DevSecOps Microservices
 
GCP Meetup #3 - Approaches to Cloud Native Architectures
GCP Meetup #3 - Approaches to Cloud Native ArchitecturesGCP Meetup #3 - Approaches to Cloud Native Architectures
GCP Meetup #3 - Approaches to Cloud Native Architectures
 
Introduction to kubernetes
Introduction to kubernetesIntroduction to kubernetes
Introduction to kubernetes
 
Building Cloud-Native Applications with Kubernetes, Helm and Kubeless
Building Cloud-Native Applications with Kubernetes, Helm and KubelessBuilding Cloud-Native Applications with Kubernetes, Helm and Kubeless
Building Cloud-Native Applications with Kubernetes, Helm and Kubeless
 
Azure meetup cloud native concepts - may 28th 2018
Azure meetup   cloud native concepts - may 28th 2018Azure meetup   cloud native concepts - may 28th 2018
Azure meetup cloud native concepts - may 28th 2018
 
Introduction of Kubernetes - Trang Nguyen
Introduction of Kubernetes - Trang NguyenIntroduction of Kubernetes - Trang Nguyen
Introduction of Kubernetes - Trang Nguyen
 
Cloud Native DevOps
Cloud Native DevOpsCloud Native DevOps
Cloud Native DevOps
 
Moving from Monolith to Microservices
Moving from Monolith to MicroservicesMoving from Monolith to Microservices
Moving from Monolith to Microservices
 
Kubernetes 101
Kubernetes 101Kubernetes 101
Kubernetes 101
 
Azure Day Rome 2019 Reloaded - Strangle(r pattern) your legacy application ru...
Azure Day Rome 2019 Reloaded - Strangle(r pattern) your legacy application ru...Azure Day Rome 2019 Reloaded - Strangle(r pattern) your legacy application ru...
Azure Day Rome 2019 Reloaded - Strangle(r pattern) your legacy application ru...
 
2017 Microservices Practitioner Virtual Summit: Microservices at Squarespace ...
2017 Microservices Practitioner Virtual Summit: Microservices at Squarespace ...2017 Microservices Practitioner Virtual Summit: Microservices at Squarespace ...
2017 Microservices Practitioner Virtual Summit: Microservices at Squarespace ...
 
The NRB Group mainframe day 2021 - Containerisation on Z - Paul Pilotto - Seb...
The NRB Group mainframe day 2021 - Containerisation on Z - Paul Pilotto - Seb...The NRB Group mainframe day 2021 - Containerisation on Z - Paul Pilotto - Seb...
The NRB Group mainframe day 2021 - Containerisation on Z - Paul Pilotto - Seb...
 
Kubernetes: від знайомства до використання у CI/CD
Kubernetes: від знайомства до використання у CI/CDKubernetes: від знайомства до використання у CI/CD
Kubernetes: від знайомства до використання у CI/CD
 
Challenges In Modern Application
Challenges In Modern ApplicationChallenges In Modern Application
Challenges In Modern Application
 
Making Cloud Native CI_CD Services.pdf
Making Cloud Native CI_CD Services.pdfMaking Cloud Native CI_CD Services.pdf
Making Cloud Native CI_CD Services.pdf
 
Kubernetes for Beginners: An Introductory Guide
Kubernetes for Beginners: An Introductory GuideKubernetes for Beginners: An Introductory Guide
Kubernetes for Beginners: An Introductory Guide
 
KubernetesPPT.pptx
KubernetesPPT.pptxKubernetesPPT.pptx
KubernetesPPT.pptx
 

Recently uploaded

20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
Matthew Sinclair
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
Neo4j
 
Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
Kumud Singh
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
DianaGray10
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
Quotidiano Piemontese
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
Adtran
 
“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”
Claudio Di Ciccio
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
名前 です男
 
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
Edge AI and Vision Alliance
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
Neo4j
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
shyamraj55
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
Octavian Nadolu
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
innovationoecd
 
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AIEnchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Vladimir Iglovikov, Ph.D.
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
Uni Systems S.M.S.A.
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Aggregage
 
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
SOFTTECHHUB
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
Alpen-Adria-Universität
 

Recently uploaded (20)

20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
 
Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
 
“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
 
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
 
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AIEnchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
 
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
 

CI/CD Pipeline with Kubernetes

  • 1. CI/CD with Kubernetes Tech Talk @Lendingkart Mihir, Rishabh May 18th, 2019
  • 2. CI/CD Introduction Why CI/CD ? What is CI/CD ? How we accomplished ?
  • 3. Why CI/CD: Initial Lendingkart Platform ! ● Started with 2 Backend, 2 UI Developers, 1 QA ● As new developers joined the team, it was difficult to understand and maintain the monolithic ● Initial monolithic catered to customer & ops with minimal features. ● Stability was a major worry as we had to deploy features and bugs on a daily basis ● Vertical scaling of our database server on a regular basis
  • 4. Why CI/CD: Monolith ● Lending involves 3 major pieces: Origination, Credit analysis, Loan management ● Our initial monolithic involved Customer, Origination and Credit analysis modules (Spring MVC) structured on the lines of SOA ● For Loan management we used a third party service to avoid re-inventing the wheel
  • 5. Why CI/CD: Monolith to Microservice Architecture ● First microservice was in the form of lead service , followed by notification service ● Subsequent break of our monolithic to microservice happened in the form of customer, credit analysis, audit, reports, scheduler, webhooks, etc ● The greatest advantage was that since our requirements were changing fast, we could make the changes quickly on the microservice and make it more mature over time
  • 6. Why CI/CD: Typical Microservice Architecture
  • 7. Why CI/CD: How We Moved to Microservices Architecture Monolithic to Microservice architecture UI MySQL DB Business logic Data Access Layer MySQL DB MongoDB MySQL Microservice Customer Microservice Ops Microservice Notification Microservice Credit Analysis Nginx UI UI UI UI
  • 8. How We Broke Our Monolithic ! ● Lead ● Audit ● Customer ● Schedulers ● Webhooks ● Search ● Authentication & Authorization ● Crypto ● Notifications (Many more)
  • 9. Problems in Existing Release & Deployment Cycle ● Too many releases every week. (Thanks to microservices!) ● Too many failures and rollbacks required manually. ● Failed machines, applications, deployments go unnoticed and would need manual intervention to bring up. ● Too many machines to be managed and procured for the release by devops. ● Every new project/service need new infrastructure & automation. ● QA needs to understand different release process for different projects like spring mvc, spring boot, node js, UI etc., ● No standard way of releasing all the projects. ● Growing infrastructure cost due to individual machine/servers for each service/replicas.
  • 12. Gitlab CI Gitlab repository .gitlabci.yml RunnerGitlab CI Gitlab CI is a powerful tool for continuously test and deploy the code. It contains all the configuration of what CI will do with your repository. Runner can be a VM, docker container or cluster of machines which runs the jobs that are defined in gitlabci.yml. Gitlab Container Registry Every project can have its own space to store its Docker images. Build and push the images to registry.
  • 14. Docker A container is a standard unit of software that packages up code and all its dependencies so the application runs quickly and reliably from one computing environment to another. ROI & Cost Saving Immutable Rapid Deployment Standardization
  • 16. KOPS (kubernetes operations) Kops is basically a Kubernetes project used to manage Kubernetes cluster to AWS. To create K8s cluster you should have:- - S3 Bucket - IAM Permissions - DNS Important Commands:- kops create cluster --name <cluster_name> --zones <zone> --state <s3_bucket> --yes kops get clusters --state="s3://k8s-lkart-clusters" kops validate cluster --state="s3://k8s-lkart-clusters" kops edit ig nodes --state="s3://k8s-lkart-clusters" kops delete cluster --name <cluster_name> --state="s3://k8s-lkart-clusters" --yes
  • 17. Kops Advantages ● Deploy clusters to existing virtual private clouds (VPC) or create a new VPC from scratch ● Supports public & private network topologies ● Provisions single or multiple master clusters ● Configurable bastion machines for SSH access to individual cluster nodes ● Rolling cluster updates ● Supports heterogeneous clusters by creating multiple instance groups
  • 18. Kubernetes to Rescue! In broad term, “Kubernetes is orchestration layer which decouples your application deployments from underlying infrastructure” !
  • 19. Kubernetes: Features/Advantages ● Orchestration layer ● Decouple Infrastructure from Applications. ● Cluster management ● Service discovery ● Make better use of your hardware resources ● Scale containerized applications and their resources on the fly. ● Declaratively manage services, which guarantees the deployed applications are always running how you deployed them ● Health-check and self-heal your apps with auto placement, autorestart, auto replication, and autoscaling. ● Horizontal scaling. ● Rolling updates (zero downtime).
  • 20. Kubernetes: Architecture replication controller, endpoints controller, namespace controller, and service accounts controller Individual node monitoring Node agent to communicate with masters & manage pod metrics Network proxy for the pods to communicate Storage stack for secrets, definitions, state of system
  • 22. Kubernetes: Cluster Setup TCP AWS Cloud ALB NGINX VPC PEERING Non K8s VPC Private Subnet Private Subnet legacy-service Pod container Pod container K8s VPC (Private subnet) lkart-service sherlock-service Ingress ELB nucleus-service Pod container Pod container Pod container Pod container vendor-tools
  • 23. Kubernetes:Deploying First Application! Service Expose application ports Bind ELB ConfigMap/Secrets/PV Environment variables Passwords Volume mounts Deployment/Statefulsets Deployment.yml Ports Docker images Resources Ingress Routing rules SSL Host details.
  • 24. Phase 1: Dockerize & Deploy ● Deployed containers on existing machines without any changes in network topology. ● Logs mounted to local disks. Challenges: ● Memory leaks ● Incorrect containers dockerized. ● No profiling ● No resource limits
  • 25. Phase 2: Critical Applications Migration to K8s ● Started dockerizing all services. ● Deployed & Stabilized the applications. ● Stabilization of cluster. Challenges: ● Logs, disk full, temp data ● Stateful applications. ● Encryption till the container. ● Monitoring & Alerts
  • 26. Phase 3: Standardisation of logs & tmp data management Pod1 Pod2 Pod3 Pod4 Pod5 Pod6 Pod7 Pod8 Tmp files PVC Bigqueue PVC Logs PVC Filebeat Filebeat Filebeat Filebeat /tmp PV /var/log/l endingka rt PV /data/bq PV NFS PVCs Node Daemonsets Kubernetes cluster
  • 27. Phase 3: Certificates Management Namespace Secretes Ingress Service 1 Service 2 POD 1 POD 2 POD 3 POD 4 SSL termination
  • 28. Phase 4: Migrating rest of applications to k8s Internal ELB Public ELB Sherlock audit consumer LkartWS Nucleus ... ... Lead
  • 29. Phase 5: QA Environment setup 1 2 3 4
  • 30. Phase 6: Serverless Auto scaling groups K8s cluster nodes ● Serverless kubernetes engine ● Pod driven auto-scaling ● Heterogenous instance groups ● Cost effective
  • 31. Demo

Editor's Notes

  1. Primary: Gautam
  2. Primary: Gautam
  3. Primary: Gautam
  4. Primary: Gautam
  5. Primary: Mihir
  6. Primary: Mihir
  7. Primary: Rishabh Advantages Building blocks: ci, registry, runner. CI: pipelines, jobs, stages, environment variables. Add sample gitlabci.yml What is gitlab CI?
  8. Primary: Rishabh Advantages Building blocks: dockerfile, container, base image etc., Sample docker files for various projects. Advantages of using docker:- ROI and Cost Saving: Fewer resources are necessary to run the application which in turn provide better resource utilisation Standardization: Standardizing service infrastructure across the entire pipeline allows every team member to work on a production parity environment. Rapid Deployment: Remove security
  9. Add both screen shot for Spring MVC and Spring boot
  10. Primary: RIshabh Advantages Building blocks: dockerfile, container, base image etc., Sample docker files for various projects. Advantages of kops refer confluence page
  11. Master nodes are used to manage k8s cluster.
  12. Primary: Mihir
  13. Primary: Mihir
  14. Primary: Mihir
  15. Primary: Mihir
  16. Primary: Mihir
  17. Primary: Mihir
  18. A network file system (NFS) is a type of file system mechanism that enables the storage and retrieval of data from multiple disks and directories across a shared network. A network file system enables local users to access remote data and files in the same way they are accessed locally.
  19. Public and Internal applications