使用minikube搭建单机k8s集群

2022-07-09  本文已影响0人  wuqingfeng

1. 下载安装

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

2. Start your cluster

直接运行minikube start指令启动失败,原因为拉取国外镜像失败。使用如下指令:

minikube start --vm-driver=docker --base-image="kicbase/stable:v0.0.32" --image-mirror-country='cn' --image-repository='registry.cn-hangzhou.aliyuncs.com/google_containers' --kubernetes-version=v1.23.8

启动,启动成功。
使用指令

$ minikube status
minikube
type: Control Plane
host: Running
kubelet: Running
apiserver: Running
kubeconfig: Configured

查看minikube运行状态。

Interact with your cluster

minikube kubectl -- get po -A

You can also make your life easier by adding the following to your shell config:

alias kubectl="minikube kubectl --"

参考资料

https://minikube.sigs.k8s.io/docs/start/

上一篇下一篇

猜你喜欢

热点阅读