VMware
CentOS7 mini
CPU 4核
内存 4G
yum install docker -y
systemctl enable docker
systemctl start docker
更换阿里云镜像仓库,需要在阿里云注册
vi /etc/docker/daemon.json
阿里云Docker镜像,点击获取
{
“registry-mirrors”: [“https://xxxxxxx.mirror.aliyuncs.com”] /这里输入阿里给你分配到的镜像url/
}
添加阿里云yum镜像源
cat > /etc/yum.repos.d/kubernetes.repo << EOF
[kubernetes]
name=Kubernetes
baseurl=https://mirrors.aliyun.com/kubernetes/yum/repos/kubernetes-el7-x86_64
enabled=1
gpgcheck=1
repo_gpgcheck=1
gpgkey=https://mirrors.aliyun.com/kubernetes/yum/doc/yum-key.gpg
https://mirrors.aliyun.com/kubernetes/yum/doc/rpm-package-key.gpg
EOF
yum install -y kubectl
下载地址
http://kubernetes.oss-cn-hangzhou.aliyuncs.com/minikube/releases/v0.30.0/minikube-linux-amd64
chmod +x minikube
mv minikube /usr/local/bin
无VM方式启动minikube,需要有docker
minikube start --image-repository=‘registry.cn-hangzhou.aliyuncs.com/google_containers’ --driver=none
验证,所有pod均正常启动则没问题
kubectl get pod -n kube-system
注:内存不足可能会导致kube-system pod 经常重启
使用的是helm3,不再区分客户端和服务端,下载即可使用
下载地址,选择3.0.0+版本
https://github.com/helm/helm/releases
chmod +x helm
mv helm /usr/local/bin
helm repo add istio.io https://storage.googleapis.com/istio-release/releases/1.3.4/charts/
helm repo update
kubectl create namespace istio-system
helm install istio.io/istio-init --namespace istio-system --generate-name
验证 kubectl get crds | grep ‘istio.io’ | wc -l
打印 23 即说明前面步骤没有问题
helm install istio.io/istio --generate-name --namespace istio-system
注:CPU或内存不足会导致某些istio pod无法启动,处于pending
具体原因查看
kubectl describe pod pod-name -n istio-system