#6: [Method-1] Deploy to Kubernetes from Jenkins Pipeline | Jenkins CI/CD Pipeline with Kubernetes

preview_player
Показать описание
In this video we are going to cover Deploy to Kubernetes from Jenkins Pipeline | Jenkins CI/CD for Kubernetes Cluster, Kubernetes Deployment using Jenkins Pipeline
#jenkinspipeline #jenkinscicd #kubernetes
==========================================================
==========================================================
0:00 Introduction
2:43 Install ssh-agent plugin in Jenkins
3:18 overview of Github repo with sample node js project with Kubernetes deployment and service
4:47 adding k8s clusterand Jenkins pipeline to deploy on Kubernetes
12:48 Build jenkins pipeline to deploy on kubernetes
14:48 verify on Kubernetes cluster and access the app

================================================================
Real Time Online Training and Support on Jenkins CI/CD, Docker, Kubernetes, Helm, Prometheus and Grafana. Contact: +91 98345 14531, +91 73875 24947
=================================================================

Below is jenkins pipeline to deploy on Kubernetes cluster
pipeline{
agent any
stages {
stage('Build Maven') {
steps{


}
}
stage('Build Docker Image') {
steps {
script {
sh 'docker build -t devopshint/nodejsapp-1.0:latest .'
}
}
}
stage('Deploy Docker Image') {
steps {
script {
withCredentials([string(credentialsId: 'dockerhub-pwd', variable: 'dockerhubpwd')]) {
sh 'docker login -u devopshint -p ${dockerhubpwd}'
}
sh 'docker push devopshint/nodejsapp-1.0:latest'
}
}
}

stage('Deploy App on k8s') {
steps {
sshagent(['k8s']) {
script {
try{
}catch(error){
}
}
}

}
}
}
}

Our GitHub repo of sample Node js app, dockerfile, deployment and service

Related Videos
#1: How to Build Java Project using Maven in Jenkins | Build a Maven Project using Jenkins

#2: Build Java Project using Maven in Jenkins Pipeline | Jenkinsfile for Maven Build | Jenkins CI/CD

#3: Build Docker Image using Jenkins Pipeline | Push Docker Image to Docker Hub using Jenkins

If you likes our video, please subscribe our channel on YouTube,
Рекомендации по теме
Комментарии
Автор

Thanks for the video. It’s great guide.

visva
Автор

Plz tell how to get private key from eks cluster. How did you take it ?

kaushik
Автор

Why did you add the deployment stage to existing pipeline ? I watched previous video also but that consists of java so we are using maven in the build stage of the pipeline, now we are using node js then why we are using maven ?

mohankumar
Автор

1.how to share data to multiple container?
2..how to attach volume to existing container?
3.how to reduce size of the docker image?

dheena_marun
Автор

Thank you for this video, can you explain helm method, I have helm installed on k8s, how to setup pipeline in jenkjns?

dattak
Автор

Can you make video Deploy to Kubernetes from Jenkins Pipeline using other plugin or method..?

lalchandrajak
Автор

Hi !! I got an error as permission denied while running the scp command. Could any one pls help

mrverse
Автор

This is not from scratch like setting up Jenkins and Kubernetes installation on local PC I tried several time I am successful on Jenkins but not on Kubernetes

sofoniasmengistu-fw
Автор

Good video but I dont think anyone will go for this approach in production.

OddBallTrails
Автор

tbh not a great video no company uses such approach in deploying k8s.

suchithreddy