2019-07-03 11:32:50 +00:00
|
|
|
|
|
|
|
---
|
2020-03-31 04:35:07 +00:00
|
|
|
title: "Basic controls"
|
2020-04-04 23:25:53 +00:00
|
|
|
weight: 2
|
2019-07-03 11:32:50 +00:00
|
|
|
description: >
|
2019-08-01 04:02:39 +00:00
|
|
|
See minikube in action!
|
2020-04-07 21:32:33 +00:00
|
|
|
aliases:
|
|
|
|
- /docs/examples/
|
2019-07-03 11:32:50 +00:00
|
|
|
---
|
|
|
|
|
2019-08-01 04:02:39 +00:00
|
|
|
Start a cluster by running:
|
2019-07-03 11:32:50 +00:00
|
|
|
|
2019-08-01 04:02:39 +00:00
|
|
|
`minikube start`
|
2019-07-03 11:32:50 +00:00
|
|
|
|
2019-08-03 00:00:24 +00:00
|
|
|
Access the Kubernetes Dashboard running within the minikube cluster:
|
2019-07-03 11:32:50 +00:00
|
|
|
|
2019-08-01 04:02:39 +00:00
|
|
|
`minikube dashboard`
|
|
|
|
|
|
|
|
Once started, you can interact with your cluster using `kubectl`, just like any other Kubernetes cluster. For instance, starting a server:
|
|
|
|
|
2019-10-31 04:21:34 +00:00
|
|
|
`kubectl create deployment hello-minikube --image=k8s.gcr.io/echoserver:1.4`
|
2019-08-01 04:02:39 +00:00
|
|
|
|
|
|
|
Exposing a service as a NodePort
|
|
|
|
|
2019-10-31 04:21:34 +00:00
|
|
|
`kubectl expose deployment hello-minikube --type=NodePort --port=8080`
|
2019-08-01 04:02:39 +00:00
|
|
|
|
|
|
|
minikube makes it easy to open this exposed endpoint in your browser:
|
|
|
|
|
|
|
|
`minikube service hello-minikube`
|
|
|
|
|
2020-04-03 03:13:38 +00:00
|
|
|
Upgrade your cluster:
|
|
|
|
|
|
|
|
`minikube start --kubernetes-version=latest`
|
|
|
|
|
2019-09-12 13:43:35 +00:00
|
|
|
Start a second local cluster (_note: This will not work if minikube is using the bare-metal/none driver_):
|
2019-08-01 04:02:39 +00:00
|
|
|
|
|
|
|
`minikube start -p cluster2`
|
|
|
|
|
|
|
|
Stop your local cluster:
|
|
|
|
|
|
|
|
`minikube stop`
|
|
|
|
|
|
|
|
Delete your local cluster:
|
|
|
|
|
|
|
|
`minikube delete`
|
2019-10-17 18:16:06 +00:00
|
|
|
|
|
|
|
Delete all local clusters and profiles
|
|
|
|
|
|
|
|
`minikube delete --all`
|