Clean Context and Create a New Kind Cluster

1 min

This guide explains how to delete an existing Kind cluster and create a new one with a custom configuration file.


1. Delete the old context

1.1. List existing clusters and contexts

bash
# List Kind clusters
kind get clusters

# List Kubernetes contexts
kubectl config get-contexts

1.2. Delete the Kind cluster

bash
# Delete a specific cluster
kind delete cluster --name <NOM_CLUSTER>

# Example: delete the default cluster
kind delete cluster --name kind

This command deletes:

  • All pods, services, and volumes in the cluster
  • The associated kubeconfig context
  • The cluster's Docker containers

1.3. Verify the deletion

bash
kubectl config get-contexts
kind get clusters

Preview — the rest of the lesson is for enrolled readers.

Already enrolled with a code?

Your access is tied to your account, not to this link. Sign in with the same email you used in class: your course is waiting, no need to enter the code again.

Sign inNo account yet? Create one
This lesson is part of the “Kubernetes Suite” module

The first modules of the course are open to everyone. For the rest you have three options: buy this course once and for all, subscribe, or enter the code handed out in class.

Are you a student on this course?

The code is tied to your account: sign in or create an account and it will be applied automatically when you come back.

No account yet? Create one