Skip to content

Commit

Permalink
docs: explain minikube detection (#6512)
Browse files Browse the repository at this point in the history
Also explaining how to find current context as many k8s newbies might not know
this. It's also worth debating calling this term "kubectl context" instead of
"kubernetes context", as Kubernetes does not have this notion, only kubectl
does.

Signed-off-by: Ahmet Alp Balkan <ahmetb@google.com>
  • Loading branch information
ahmetb authored Aug 26, 2021
1 parent d28479b commit d661356
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
17 changes: 14 additions & 3 deletions docs/content/en/docs/environment/local-cluster.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,32 @@ uses images straight from your local docker daemon. It leads to much faster deve

### Auto detection

Skaffold's heuristic to detect local clusters is based on the Kubernetes context name.
The following context names are checked:
Skaffold's heuristic to detect local clusters is based on the Kubernetes context name
set on kubectl. You can find your the current context name by running:

```bash
kubectl config current-context
```

Skaffold checks for the following context names:

| Kubernetes context | Local cluster type | Notes |
| ------------------ | ------------------ | ----- |
| docker-desktop | [`Docker Desktop`] | |
| docker-for-desktop | [`Docker Desktop`] | This context name is deprecated |
| minikube | [`minikube`] | |
| minikube <sup>1</sup> | [`minikube`] | See <sup>1</sup> | |
| kind-(.*) | [`kind`] | This pattern is used by kind >= v0.6.0 |
| (.*)@kind | [`kind`] | This pattern was used by kind < v0.6.0 |
| k3d-(.*) | [`k3d`] | This pattern is used by k3d >= v3.0.0 |

For any other name, Skaffold assumes that the cluster is remote and that images
have to be pushed.

<sup>1</sup> Additionally, a Kubernetes context may be considered as `minikube`
even if it's not named `minikube` but it's cluster certificate is stored at
`$HOME/.minikube` or the `minikube profile list` command returns the Kubernetes
context name.

[`minikube`]: https://github.com/kubernetes/minikube/
[`Docker Desktop`]: https://www.docker.com/products/docker-desktop
[`kind`]: https://github.com/kubernetes-sigs/kind
Expand Down
2 changes: 1 addition & 1 deletion docs/static/stylesheets/infopanel.css
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
}

sup {
font-size: 18px;
font-size: 0.8rem;
line-height: 2em;
}

Expand Down

0 comments on commit d661356

Please sign in to comment.