SlideShare ist ein Scribd-Unternehmen logo
1 von 31
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

Weitere ähnliche Inhalte

Was ist angesagt?

Helm - Package Manager for Kubernetes
Helm - Package Manager for KubernetesHelm - Package Manager for Kubernetes
Helm - Package Manager for KubernetesKnoldus Inc.
 
(Draft) Kubernetes - A Comprehensive Overview
(Draft) Kubernetes - A Comprehensive Overview(Draft) Kubernetes - A Comprehensive Overview
(Draft) Kubernetes - A Comprehensive OverviewBob Killen
 
GitOps is IaC done right
GitOps is IaC done rightGitOps is IaC done right
GitOps is IaC done rightChen Cheng-Wei
 
GitOps 101 Presentation.pdf
GitOps 101 Presentation.pdfGitOps 101 Presentation.pdf
GitOps 101 Presentation.pdfssuser31375f
 
Deploy Application on Kubernetes
Deploy Application on KubernetesDeploy Application on Kubernetes
Deploy Application on KubernetesOpsta
 
Kubernetes 101 for Beginners
Kubernetes 101 for BeginnersKubernetes 101 for Beginners
Kubernetes 101 for BeginnersOktay Esgul
 
GitLab과 Kubernetes를 통한 CI/CD 구축
GitLab과 Kubernetes를 통한 CI/CD 구축GitLab과 Kubernetes를 통한 CI/CD 구축
GitLab과 Kubernetes를 통한 CI/CD 구축철구 김
 
Delivering Quality at Speed with GitOps
Delivering Quality at Speed with GitOpsDelivering Quality at Speed with GitOps
Delivering Quality at Speed with GitOpsWeaveworks
 
Gitops: the kubernetes way
Gitops: the kubernetes wayGitops: the kubernetes way
Gitops: the kubernetes waysparkfabrik
 
Kubernetes Workshop
Kubernetes WorkshopKubernetes Workshop
Kubernetes Workshoploodse
 
Kubernetes
KubernetesKubernetes
Kuberneteserialc_w
 
IBM MQ What's new - Sept 2022
IBM MQ What's new - Sept 2022IBM MQ What's new - Sept 2022
IBM MQ What's new - Sept 2022David Ware
 
Chef for DevOps - an Introduction
Chef for DevOps - an IntroductionChef for DevOps - an Introduction
Chef for DevOps - an IntroductionSanjeev Sharma
 
CI/CD Best Practices for Your DevOps Journey
CI/CD Best  Practices for Your DevOps JourneyCI/CD Best  Practices for Your DevOps Journey
CI/CD Best Practices for Your DevOps JourneyDevOps.com
 
Kubernetes - A Comprehensive Overview
Kubernetes - A Comprehensive OverviewKubernetes - A Comprehensive Overview
Kubernetes - A Comprehensive OverviewBob Killen
 

Was ist angesagt? (20)

Helm - Package Manager for Kubernetes
Helm - Package Manager for KubernetesHelm - Package Manager for Kubernetes
Helm - Package Manager for Kubernetes
 
(Draft) Kubernetes - A Comprehensive Overview
(Draft) Kubernetes - A Comprehensive Overview(Draft) Kubernetes - A Comprehensive Overview
(Draft) Kubernetes - A Comprehensive Overview
 
GitOps is IaC done right
GitOps is IaC done rightGitOps is IaC done right
GitOps is IaC done right
 
GitOps 101 Presentation.pdf
GitOps 101 Presentation.pdfGitOps 101 Presentation.pdf
GitOps 101 Presentation.pdf
 
Deploy Application on Kubernetes
Deploy Application on KubernetesDeploy Application on Kubernetes
Deploy Application on Kubernetes
 
Kubernetes 101 for Beginners
Kubernetes 101 for BeginnersKubernetes 101 for Beginners
Kubernetes 101 for Beginners
 
GitLab과 Kubernetes를 통한 CI/CD 구축
GitLab과 Kubernetes를 통한 CI/CD 구축GitLab과 Kubernetes를 통한 CI/CD 구축
GitLab과 Kubernetes를 통한 CI/CD 구축
 
Delivering Quality at Speed with GitOps
Delivering Quality at Speed with GitOpsDelivering Quality at Speed with GitOps
Delivering Quality at Speed with GitOps
 
Gitops: the kubernetes way
Gitops: the kubernetes wayGitops: the kubernetes way
Gitops: the kubernetes way
 
Kubernetes Workshop
Kubernetes WorkshopKubernetes Workshop
Kubernetes Workshop
 
Kubernetes
KubernetesKubernetes
Kubernetes
 
DevOps with Kubernetes
DevOps with KubernetesDevOps with Kubernetes
DevOps with Kubernetes
 
Packer
Packer Packer
Packer
 
Benefits of DevSecOps
Benefits of DevSecOpsBenefits of DevSecOps
Benefits of DevSecOps
 
IBM MQ What's new - Sept 2022
IBM MQ What's new - Sept 2022IBM MQ What's new - Sept 2022
IBM MQ What's new - Sept 2022
 
Chef for DevOps - an Introduction
Chef for DevOps - an IntroductionChef for DevOps - an Introduction
Chef for DevOps - an Introduction
 
CI/CD Best Practices for Your DevOps Journey
CI/CD Best  Practices for Your DevOps JourneyCI/CD Best  Practices for Your DevOps Journey
CI/CD Best Practices for Your DevOps Journey
 
Kubernetes - A Comprehensive Overview
Kubernetes - A Comprehensive OverviewKubernetes - A Comprehensive Overview
Kubernetes - A Comprehensive Overview
 
Monolithic architecture
Monolithic architectureMonolithic architecture
Monolithic architecture
 
DevOps: Age Of CI/CD
DevOps: Age Of CI/CDDevOps: Age Of CI/CD
DevOps: Age Of CI/CD
 

Ähnlich wie 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 knativeMofizur 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 Kuberneteskloia
 
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 KubernetesSumo 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 Architecturesnine
 
Introduction to kubernetes
Introduction to kubernetesIntroduction to kubernetes
Introduction to kubernetesHelder 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 KubelessBitnami
 
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 2018Jim Bugwadia
 
Cloud Native DevOps
Cloud Native DevOpsCloud Native DevOps
Cloud Native DevOpsJim Bugwadia
 
Moving from Monolith to Microservices
Moving from Monolith to MicroservicesMoving from Monolith to Microservices
Moving from Monolith to MicroservicesMist.io
 
Kubernetes 101
Kubernetes 101Kubernetes 101
Kubernetes 101Vishwas 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/CDStfalcon Meetups
 
Challenges In Modern Application
Challenges In Modern ApplicationChallenges In Modern Application
Challenges In Modern ApplicationRahul 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.pdfRakuten Group, Inc.
 
KubernetesPPT.pptx
KubernetesPPT.pptxKubernetesPPT.pptx
KubernetesPPT.pptxRyuzaki360
 
Micro Front-End & Microservices - Plansoft
Micro Front-End & Microservices - PlansoftMicro Front-End & Microservices - Plansoft
Micro Front-End & Microservices - PlansoftMiki Lombardi
 

Ähnlich wie 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
 
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
 
KubernetesPPT.pptx
KubernetesPPT.pptxKubernetesPPT.pptx
KubernetesPPT.pptx
 
Micro Front-End & Microservices - Plansoft
Micro Front-End & Microservices - PlansoftMicro Front-End & Microservices - Plansoft
Micro Front-End & Microservices - Plansoft
 
Dockerization
DockerizationDockerization
Dockerization
 

Kürzlich hochgeladen

08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGSujit Pal
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 

Kürzlich hochgeladen (20)

08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAG
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 

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

Hinweis der Redaktion

  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