Code Monkey home page Code Monkey logo

sahilkeshri1704 / gke-cicd Goto Github PK

View Code? Open in Web Editor NEW

This project forked from vishal-bulbule/gke-cicd

0.0 0.0 0.0 35 KB

This repository contains code and resources for implementing a robust Continuous Integration/Continuous Deployment (CI/CD) pipeline for deploying applications on Google Kubernetes Engine (GKE). The pipeline leverages Google Cloud Build and Cloud Deploy services to automate the deployment processes.

Home Page: https://youtu.be/L_1qbt-Iii0?feature=shared

Python 15.19% HTML 79.31% Dockerfile 5.50%

gke-cicd's Introduction

CI/CD Pipeline for Deploying Applications on Google Kubernetes Engine (GKE)

Introduction

In the modern software development landscape, Continuous Integration/Continuous Deployment (CI/CD) pipelines play a pivotal role in automating the process of building, testing, and deploying applications. In this blog post, we’ll deep dive into the implementation of a robust CI/CD pipeline to deploy applications on Google Kubernetes Engine (GKE) using Google Cloud Build and Cloud Deploy services.

Video Tutorial : YouTube

Requirements

To achieve our goal, we have the following requirements:

  • Deployment of two simple Flask applications (app1 & app2) on the GKE clusters.
  • Automation of the entire deployment process, triggered by a developer’s code push.
  • Dev-cluster deployment precedes production deployment, allowing for review before promoting to the prod-cluster.

Architecture

image

Technical Stack Summary

This CI/CD pipeline leverages several key components:

  • Google Kubernetes Engine (GKE): Google’s managed Kubernetes service, providing a scalable and reliable platform for deploying containerized applications.
  • Cloud Build: A fully managed continuous integration and continuous delivery platform that allows developers to build, test, and deploy applications on Google Cloud Platform.
  • Cloud Deploy: A service for continuous delivery that automates the deployment of containerized applications to Google Kubernetes Engine and other platforms.
  • GitHub: A popular version control platform where developers collaborate, manage, and version control their codebase.

Solution

We are going to implement the solution using the following steps to implement the CI/CD pipeline for deploying applications on GKE:

  1. Create two simple Flask applications (app1 & app2).

  2. Set up a GitHub repository and push the application code.

  3. Create two GKE clusters: dev-cluster and prod-cluster, using Google Kubernetes Engine.

  4. Create Kubernetes manifest files in the Kubernetes folder to deploy the application and expose it as a service.

  5. Create skaffold.yaml file now.

  6. Now Create cloudbuild.yaml file to build and push docker images to Artifact registry for both application and Configure a Cloud Build trigger to initiate the pipeline upon code push events in the GitHub repository.

  7. Implement the necessary code to define the Cloud Deploy pipeline and targets for both dev-cluster and prod-cluster.

  8. Push the updated code to the GitHub repository, triggering the Cloud Build and Cloud Deploy processes.

    If you encounter any confusion, please refer to the Video linked at the beginning of the blog.

gke-cicd's People

Contributors

vishal-bulbule avatar sahilkeshri1704 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.