Cyber Deals - Get up to 65% off on CKA, CKAD, CKS, KCNA, KCSA exams and courses!

Exploring Kubernetes 1.29 with Kind

Exploring Kubernetes 1.29 with Kind

What is Kind (Kubernetes IN Docker)?

Kind, short for Kubernetes IN Docker, is a tool designed to simplify the process of creating Kubernetes clusters for local development and testing. Leveraging Docker containers, Kind enables users to spin up Kubernetes clusters quickly and efficiently on their local machines. It provides an easy way to experiment with different Kubernetes versions, configurations, and scenarios without the need for external infrastructure. Kind’s flexibility and speed make it an ideal choice for developers and testers looking to replicate Kubernetes environments in a lightweight and portable manner.

Exploring Kubernetes with Kind

Kind (Kubernetes IN Docker) makes it easy to create Kubernetes clusters for testing and development. Let’s dive into setting up Kind and experimenting with different configurations.

Install Kind

Get started by installing Kind. Visit the Kind Quick Start page for installation instructions.

Create a Kind Cluster

Use the following commands to create a basic Kind cluster:

$ kind create cluster --name test-kind

This command sets up a default cluster with one control plane node. This is the easiest way to spin up a Kubernetes cluster.

Kind will use Docker as the default provider. Now, if you want to use Podman as the provider, you can use the following method

$ KIND_EXPERIMENTAL_PROVIDER=podman kind create cluster --name test-kind

But we want to create a multi-node Kubernetes cluster and not just a single node here. For that, we need to use the cluster configuration file. Before that, let’s delete the cluster as follows.

$ kind delete cluster

Customize Your Cluster with a Config File

Create a config file, for example, ~/.kube/kind_cluster , with the following content:

kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
nodes:
- role: control-plane
- role: worker
- role: worker
- role: worker

Then, create a cluster using this config:

$ kind create cluster --config ~/.kube/kind_cluster

Creating cluster "kind" ...
 βœ“ Ensuring node image (kindest/node:v1.27.3)

πŸ–Ό
βœ“ Preparing nodes
πŸ“¦
πŸ“¦
πŸ“¦
βœ“ Writing configuration
πŸ“œ
βœ“ Starting control-plane
πŸ•Ή
βœ“ Installing CNI
πŸ”Œ
βœ“ Installing StorageClass
πŸ’Ύ
βœ“ Joining worker nodes
🚜
Set kubectl context to "kind-kind" You can now use your cluster with: kubectl cluster-info --context kind-kind Thanks for using kind!
😊

Specify Kubernetes Version

To use a specific Kubernetes version, provide the --image flag. For example, the following command will create the cluster with Kubernetes 1.29 version.

$ kind create cluster \
  --name my-kind-cluster \
  --config ~/.kube/kind_cluster \
  --image kindest/node:v1.29.0@sha256:eaa1450915475849a73a9227b8f201df25e55e268e5d619312131292e324d570

You can replace v1.29.0 and the SHA256 with your desired version. Refer to the kindest/node image tags to find the available versions.

Cluster Access

After the cluster is created, Kind provides instructions for accessing it. Set the kubectl context and explore your cluster:

$ kubectl cluster-info --context kind-my-kind-cluster

Kubernetes control plane is running at https://127.0.0.1:33805
CoreDNS is running at https://127.0.0.1:33805/api/v1/namespaces/kube-system/services/kube-dns:dns/proxy

To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'.

$ kubectl get nodes
NAME                            STATUS   ROLES           AGE   VERSION
my-kind-cluster-control-plane   Ready    control-plane   64s   v1.29.0
my-kind-cluster-worker          Ready    <none>          40s   v1.29.0
my-kind-cluster-worker2         Ready    <none>          41s   v1.29.0

Now you’re ready to harness the power of Kubernetes 1.29 with Kind! Happy exploring!

😊

Gineesh Madapparambath

Gineesh Madapparambath

Gineesh Madapparambath is the founder of techbeatly. He is the co-author of The Kubernetes Bible, Second Edition and the author of Ansible for Real Life Automation. He has worked as a Systems Engineer, Automation Specialist, and content author. His primary focus is on Ansible Automation, Containerisation (OpenShift & Kubernetes), and Infrastructure as Code (Terraform). (Read more: iamgini.com)


Disclaimer: Views expressed in articles are those of the respective authors and do not necessarily reflect the views of their employers or this site. While we aim for accuracy, please verify information before relying on it, and let us know if you spot an error.
Share:

Related Posts

Promo: Get Up to $700 Off on KubeCon + CloudNativeCon North America 2023 Tickets

Promo: Get Up to $700 Off on KubeCon + CloudNativeCon North America 2023 Tickets

In this blog post, we'll dive into the event details, the techbeatly promo, and why attending this conference is a must for cloud-native enthusiasts.

Book Review: Mastering Elastic Kubernetes Service on AWS

Book Review: Mastering Elastic Kubernetes Service on AWS

The authors start by breaking down the basics, from containers and Docker to Kubernetes core concepts. It's a smooth way to ensure you're on the same …

Managing Containers at AWS – Unveiling the Perfect Services for Your Use Cases

Managing Containers at AWS – Unveiling the Perfect Services for Your Use Cases

In this article, we'll explore the key container services offered by AWS and understand the best use cases for each.

Red Hat OpenShift Compliance Operator – Overview

Red Hat OpenShift Compliance Operator – Overview

Overview Growth in digital services and faster time to market by various global and government organisations, Security has become one of the important …

Secure Your Containers: Trivy Vulnerability Scanning

Secure Your Containers: Trivy Vulnerability Scanning

In today’s digital age, software applications and systems are vulnerable to a wide range of security threats. These threats can compromise sensitive …

A DevOps Guide to Kubernetes Logging

A DevOps Guide to Kubernetes Logging

Learn tips and tricks to set up and use Kubernetes Logging to collect logs from all your applications and services deployed on the Kubernetes …