Basic Commands:
0minikube version查看版本
1minikube start启动一个集群
minikube start --vm-driver=none --image-repository=registry.cn-hangzhou.aliyuncs.com/google_containers
start命令详解
--kubernetes-version="v1.16.0"
--memory 3000
--cpus=2
minikube start --vm-driver=none --image-repository=registry.cn-hangzhou.aliyuncs.com/google_containers --kubernetes-version="v1.16.0" --memory 3000 --cpus=2
2 minikube status查看集群状态
3minikube stop 停止一个集群
4 minikube delete 删除集群
5minikube addons list 列出addons
- addon-manager: enabled
- dashboard: disabled
- default-storageclass: enabled
- efk: disabled
- freshpod: disabled
- gvisor: disabled
- helm-tiller: disabled
- ingress: disabled
- ingress-dns: disabled
- logviewer: disabled
- metrics-server: disabled
- nvidia-driver-installer: disabled
- nvidia-gpu-device-plugin: disabled
- registry: disabled
- registry-creds: disabled
- storage-provisioner: enabled
- storage-provisioner-gluster: disabled
6 minikube addons enable dashboard 启用addons
minikube addons enable metrics-server
minikube addons enable registry
minikube addons enable ingress
minikube addons enable helm-tiller
7minikube addons disable registry 删除addon
8 minikube addons configure registry-creds 配置addon
9minikube addons open dashboard
10minikube ip获取集群ip
11minikube dashboard 启动dashboard代理
不过是绑定在127.0.0.1上面的
可以将kubernetes-dashboard svc 改为nodeport类型
然后通过nodeport访问
如果无法访问则
iptables -P FORWARD ACCEPT
12 minikube service list 列出所有service
13minikube logs 显示所有日志
14minikube config 配置设置
minikube config view
minikube config get
minikube config set
minikube config unset
Configurable fields:
* vm-driver
* container-runtime
* feature-gates
* v
* cpus
* disk-size
* host-only-cidr
* memory
* log_dir
* kubernetes-version
* iso-url
* WantUpdateNotification
* ReminderWaitPeriodInHours
* WantReportError
* WantReportErrorPrompt
* WantKubectlDownloadMsg
* WantNoneDriverWarning
* profile
* bootstrapper
* ShowDriverDeprecationNotification
* ShowBootstrapperDeprecationNotification
* dashboard
* addon-manager
* default-storageclass
* efk
* ingress
* insecure-registry
* registry
* registry-creds
* freshpod
* storage-provisioner
* storage-provisioner-gluster
* metrics-server
* nvidia-driver-installer
* nvidia-gpu-device-plugin
* logviewer
* gvisor
* helm-tiller
* ingress-dns
* hyperv-virtual-switch
* disable-driver-mounts
* cache
* embed-certs
* native-ssh
来源:CSDN
作者:hxpjava1
链接:https://blog.csdn.net/hxpjava1/article/details/103573681