Skip to content

🧪 Getting Started - Setting up my Kubernetes development environment

Welcome! This is your first notebook entry in the GROW program.
Use this space to document the setup of your Kubernetes learning environment and reflect on what you’re configuring.


✅ Goals

By the end of this section, you will: - Install and configure basic Kubernetes CLI tools - Create your first local Kubernetes cluster using K3D - Deploy and inspect your first Pod - Verify your setup is working for the labs ahead


🛠️ Step-by-Step Setup Instructions

Step 1: Install kubectl

Follow the official guide:
➡️ https://kubernetes.io/docs/tasks/tools/install-kubectl/

Verify:

kubectl version --client

Step 2: Install K3D

Follow the official guide:
➡️ https://k3d.io/stable/#installation

Verify:

k3d version


Step 3: Create a Local Cluster

For these labs, I created a cluster from a config file, but you can also create one with a simple command:

k3d cluster create grow-cluster

To create a cluster with a config file, use:

k3d cluster create --config k3d-config.yaml

See below for the content of k3d-config.yaml:

apiVersion: k3d.io/v1alpha5
kind: Simple
metadata:
  name: grow-cluster
image: rancher/k3s:v1.33.6-k3s1
servers: 1
agents: 2

ports:
  - port: 80:80
    nodeFilters:
      - loadbalancer
  - port: 443:443
    nodeFilters:
      - loadbalancer

This cluster has one control-plane node and two worker nodes, as defined in the k3d-config.yaml file. In K3D, they are called server and agent nodes, respectively.

Note: Here I had to enforce the Kubernetes version, because if I simply created a cluster without specifying the version, I got Kubernetes 1.31, which was not compatible with Flux. When running flux check --pre, the check didn't pass because of the Kubernetes version. Now it works.

Check your nodes:

kubectl get nodes

Step 4: Deploy Your First Pod

kubectl run nginx --image=nginx
kubectl get pods

Describe it:

kubectl describe pod nginx

Delete it:

kubectl delete pod nginx