Little helper to run CNCF's k3s in Docker
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
k3d/docs/index.md

35 lines
1.3 KiB

# rancher/k3d
4 years ago
k3d is a lightweight wrapper to run [k3s](https://github.com/rancher/k3s) (Rancher Lab's minimal Kubernetes distribution) in docker.
4 years ago
k3d makes it very easy to create single- and multi-node [k3s](https://github.com/rancher/k3s) clusters in docker, e.g. for local development on Kubernetes.
4 years ago
## Installation
- Install via brew (homebrew/linuxbrew): `brew install k3d`
- Install via script:
- wget: `wget -q -O - https://raw.githubusercontent.com/rancher/k3d/master/install.sh | bash`
- curl: `curl -s https://raw.githubusercontent.com/rancher/k3d/master/install.sh | bash`
- Grab a release from the [release tab](https://github.com/rancher/k3d/releases) and install it yourself.
- Get via go: `go install github.com/rancher/k3d` (**Note**: this will give you unreleased/bleeding-edge changes)
4 years ago
## Quick Start
Create a cluster named `mycluster` with just a single master node:
```bash
k3d create cluster mycluster
```
Get the new cluster's connection details merged into your default kubeconfig (usually specified using the `KUBECONFIG` environment variable or the default path `$HOME/.kube/config`) and directly switch to the new context:
```bash
k3d get kubeconfig mycluster --switch
```
Use the new cluster with [`kubectl`](https://kubernetes.io/docs/tasks/tools/install-kubectl/), e.g.:
```bash
kubectl get nodes
```