Loading video player...
Learn how to install kubectl on your Jenkins server and configure kubeconfig so Jenkins can communicate directly with your Kubernetes cluster — every command explained step by step for complete beginners in this DevOps pipeline series. ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ WHAT YOU'LL LEARN: - Why Jenkins needs kubectl and kubeconfig to talk to Kubernetes Jenkins is the factory manager — kubectl is the radio kubeconfig is the communication frequency — without it nothing works What breaks in your pipeline if this step is skipped - Downloading kubectl the right way How the nested curl command finds the latest stable version automatically Why we download the binary directly instead of using apt-get What the download command is actually doing behind the scenes - Making kubectl executable with chmod What chmod does and what the plus x flag means Why downloaded files are not executable by default on Linux What happens if you skip this step - Moving kubectl to the system PATH Why we move it to /usr/local/bin specifically What PATH is and why it means you can run kubectl from anywhere How Linux finds commands when you type them in the terminal - Verifying kubectl is installed correctly What kubectl version shows — client version vs server version explained What each part of the output means - Setting up the kubeconfig directory Why kubectl looks in the .kube folder by default What happens if this directory does not exist - Copying kubeconfig from the Kubernetes master node to Jenkins What is actually inside a kubeconfig file — explained in plain English The cluster endpoint — what it is and why it is needed Certificate Authority data — what it proves and why it matters User credentials — client certificate and key explained simply Context — which cluster and user combination to use Why this file is highly sensitive and gives full cluster access How to copy it securely — what you must never do (email, chat, Slack) How to paste it correctly into the Jenkins server using vi - Verifying the full connection between Jenkins and Kubernetes What kubectl cluster-info shows when everything is working What kubectl get nodes shows and what Ready status means Common errors and how to fix them Connection refused — what causes it and how to solve it Certificate errors — what they mean Wrong server IP in kubeconfig — how to identify and update it ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ PREREQUISITES: - Jenkins installed and running on AWS EC2 (see Chapter 2) - Docker connected to Jenkins (see Chapter 3) - Kubernetes cluster running with worker nodes joined (see Chapter 4) - Jenkins pipeline script ready (see Chapter 5) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ RELATED VIDEOS: - Chapter 1 — Ubuntu VM Setup on AWS EC2 (Part 1) - Chapter 2 — Java and Jenkins Installation from Zero (Part 2) - Chapter 3 — Docker Installation and Jenkins Integration (Part 3) - Chapter 4 — Kubernetes Cluster Setup with kubeadm (Part 4) - Chapter 5 — Writing the Full Jenkins Pipeline Script (Part 5) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ Found this helpful? Like, Subscribe and hit the bell for weekly DevOps tutorials. Stuck on a step? Comment below — I reply to every one.