Aru*_*run 4 kubernetes windows-10 kubectl minikube
我安装minikube
在Windows 10
. 我可以开始minikube
**C:\WINDOWS\system32>minikube start
* minikube v1.15.1 on Microsoft Windows 10 Pro 10.0.18363 Build 18363
* Using the hyperv driver based on existing profile
* Starting control plane node minikube in cluster minikube
* Restarting existing hyperv VM for "minikube" ...
* Preparing Kubernetes v1.19.4 on Docker 19.03.13 ...
* Verifying Kubernetes components...
* Enabled addons: storage-provisioner, default-storageclass
* kubectl not found. If you need it, try: 'minikube kubectl -- get pods -A'
* Done! kubectl is now configured to use "minikube" cluster and "default" namespace by default**
Run Code Online (Sandbox Code Playgroud)
但上面的输出中有一个警告(最后第二行)说
kubectl not found. If you need it, try: 'minikube kubectl -- get pods -A'
之后我也执行了这个命令minikube kubectl -- get pods -A
尝试时仍然低于错误kubectl
C:\WINDOWS\system32>kubectl
'kubectl' is not recognized as an internal or external command,
operable program or batch file.
Run Code Online (Sandbox Code Playgroud)
Vla*_*hin 12
Minikube 安装kubectl
在其自身内部。
因此,要使用kubectl
通过 minikube 安装的,您必须在命令参数前面加上minikube kubectl --
. 例如:
# the same as `kubectl version --client`
minikube kubectl -- version --client
Run Code Online (Sandbox Code Playgroud)
为了方便起见,您可能需要在 shell 配置中添加别名。
来源:https://minikube.sigs.k8s.io/docs/handbook/kubectl/
归档时间: |
|
查看次数: |
18925 次 |
最近记录: |