Difference between revisions of "Install Kubernetes in Docker (KinD)"
Jump to navigation
Jump to search
(→Usage) |
|||
(One intermediate revision by the same user not shown) | |||
Line 36: | Line 36: | ||
2. Create a cluster: | 2. Create a cluster: | ||
<pre> | <pre> | ||
− | kind create cluster | + | kind create cluster -n <cluster name> |
</pre> | </pre> | ||
Line 52: | Line 52: | ||
* Delete cluster: | * Delete cluster: | ||
<pre> | <pre> | ||
− | kind delete cluster | + | kind delete cluster -n <cluster name> |
</pre> | </pre> | ||
Latest revision as of 03:51, 17 September 2024
Installing Kubernetes in Docker (KinD)
Prerequisites
- Docker installed and running
- kubectl installed (see below)
Installing kubectl
1. Download kubectl:
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
2. Make kubectl executable:
chmod +x ./kubectl
3. Move kubectl to a directory in your PATH:
sudo mv ./kubectl /usr/local/bin/kubectl
4. Verify installation:
kubectl version --client
Installing KinD
1. Install KinD:
curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.24.0/kind-linux-amd64 chmod +x ./kind sudo mv ./kind /usr/local/bin/kind
2. Create a cluster:
kind create cluster -n <cluster name>
3. Verify installation:
kubectl cluster-info --context kind-kind
Usage
- List clusters:
kind get clusters
- Delete cluster:
kind delete cluster -n <cluster name>