minikube 基本操作

To install minikube on x86-64 macOS using binary download:

curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-darwin-amd64
sudo install minikube-darwin-amd64 /usr/local/bin/minikube

Basic controls

See minikube in action!
Start a cluster by running:
minikube start
Access the Kubernetes Dashboard running within the minikube cluster:
minikube dashboard
Once started, you can interact with your cluster using kubectl, just like any other Kubernetes cluster. For instance, starting a server:
kubectl create deployment hello-minikube --image=k8s.gcr.io/echoserver:1.4
Exposing a service as a NodePort
kubectl expose deployment hello-minikube --type=NodePort --port=8080
minikube makes it easy to open this exposed endpoint in your browser:
minikube service hello-minikube
Upgrade your cluster:
minikube start --kubernetes-version=latest
Start a second local cluster (note: This will not work if minikube is using the bare-metal/none driver):
minikube start -p cluster2
Stop your local cluster:
minikube stop
Delete your local cluster:
minikube delete
Delete all local clusters and profiles
minikube delete --all

参考:https://minikube.sigs.k8s.io/docs/handbook/controls/

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容