Deploy local Minikube single-node clusters, install Helm package managers, configure load balancer services, and execute zero-downtime rolling upgrades.
Environment
Minikube / Kubernetes API
Difficulty
Advanced
Course Module
Chapter 8: Kubernetes
Deliverables
App Deployments & Tunnel Logs
1. System Architecture & Workflow
The diagram below displays the cluster architecture details of a single-node Minikube deployment, mapping how client tools interface with API managers and route incoming requests.
2. Part 1: Step-by-Step Action Items & Key Execution Steps
STEP 1
Install the Kubectl Client Command Line Utility
Download and deploy the Kubernetes command-line interface executable to query host cluster managers.
This command installs the kubectl binary globally with execute permissions and prints the client version to verify installation.
STEP 2
Install and Initialize a Local Minikube Single-Node Cluster
Verify CPU nested hardware virtualization support, download Minikube, and start the local Kubernetes cluster using the Docker driver.
$ egrep -c '(vmx|svm)' /proc/cpuinfo
This command checks the processor attributes for hardware virtualization (VT-x or AMD-V) support inside the guest VM kernel. If it returns 0, you must enable nested hardware virtualization in your host settings before starting Minikube.
This command starts the local Docker service daemon to ensure the container socket is active, then starts the single-node Minikube cluster using the Docker container driver.
$ kubectl get nodes
This command queries the cluster API server for a status list of all active nodes, verifying that the node is running.
STEP 3
Install the Helm Package Manager
Register stable repository sources and deploy the Helm package manager to simplify deploying complex applications.
This command applies configuration templates to provision Nginx replicas and configure a NodePort service to route traffic.
$ kubectl get pods -l app=nginx && kubectl get svc nginx-service
This command queries the API server to verify that the Nginx pods are running and lists the service IP address.
$ minikube service nginx-service --url
This command starts a tunnel linking the exposed NodePort to a host system URL, allowing you to access the web server from your browser.
STEP 5
Execute a Rolling Upgrade without Downtime
Update container image versions and track status logs as the cluster performs a rolling update.
$ kubectl set image deployment/nginx-deployment nginx=nginx:1.25.1 --record
This command updates the deployment's container image version to 1.25.1 and records the change in the rollout history.
$ kubectl rollout status deployment/nginx-deployment
This command monitors the update progress in real-time, confirming that new pods start successfully before old ones are terminated.
3. Operational Pipeline Architecture
The diagram below outlines the rolling update sequence. The cluster replaces pods one-by-one, maintaining service availability throughout the upgrade.
4. Part 2: Complete Deliverable Assets & Production Templates
To deploy the application to your Kubernetes cluster, we will write a deployment manifest and a service manifest. Below is a step-by-step breakdown of how these manifest configurations are constructed, followed by the final combined files.
Step-by-Step Manifest Construction
Step 1
Define the Deployment Metadata and Replica Selector
Setup the manifest API headers and declare the labels used to discover the application pods.
This block targets the apps/v1 schema, sets the workload kind to Deployment, defines the resource name, requests 2 active pod replicas, and configures selectors to manage pods labeled app: nginx.
Step 2
Define Pod Template Specs and Resource Limits
Configure pod container images, ports, and execution safety limits.
This configures the Pod blueprint, specifies using the nginx:1.24 container image, exposes container port 80, and enforces limits (128 Megabytes RAM, 0.2 CPU cores) to prevent resource hogging.
Step 3
Write the NodePort Service Manifest
Map cluster network routes, linking external node ports to the container ports.
This service definition routes external traffic hitting host port 30080 to container port 80 using the label selector to balance loads across matching pods.
Combined Complete Manifest Files
Create these files in your project directory (~/Projects) and apply them to the cluster: