Docker desktop how to create new k8s cluster context

Viewed 180

I have Docker Desktop and I want to create multiple clusters so I can work on different projects. For example cluster name 1: hello and cluster name 2: world.

I currently have one cluster with the context of docker-desktop that actually working.

1 Answers

To clarify I am posting Community Wiki answer.

A tool kind met your expectations in this case.

kind is a tool for running local Kubernetes clusters using Docker container “nodes”. kind was primarily designed for testing Kubernetes itself, but may be used for local development or CI.

Here one can find User Guide to this tool. One can install it with 5 ways:

To create cluster with this tool run:

kind create cluster

To specify another image use the --image flag:

kind create cluster --image=xyz

In kind the node-image is built off the base-image, that installs all the dependencies required for Docker and Kubernetes to run in a container.

To assign the cluster a different name than kind, use --name flag.

More uses can be found with with:

kind create cluster --help
Related