
1 – Install Jenkins on Kubernetes
2 – After the installation of Jenkins, install the Kubernetes Plugin
3 – Configuring the Pods:
3.1 – Navigate to Configure Jenkins / Manager Nodes and Clouds / Configure Clouds / Choose Kubernetes and configure the Kubernetes and the pod template with the image jenkins/inbound-agent / Select the option WebSocket


it’s done! now let’s just check!
4 – Create a new Item / Pipeline / Choose Pipeline Script and fill with this example:
podTemplate { node(POD_LABEL) { stage('Run shell') { sh 'echo hello world' } }}
5 – Just execute and be happy!
References: https://www.jenkins.io/doc/book/pipeline/docker/ https://www.jenkins.io/doc/book/pipeline/docker/#dockerfile
Post a Comment