安装docker
wget https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo -O /etc/yum.repos.d/docker-ce.repo
yum -y install docker-ce-20.10.10-3.el8
systemctl enable docker && systemctl start docker
docker --version
安装k8s
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=0
repo_gpgcheck=0
gpgkey=https://mirrors.aliyun.com/kubernetes/yum/doc/yum-key.gpg https://mirrors.aliyun.com/kubernetes/yum/doc/rpm-package-key.gpg
EOF
yum list kubeadm --showduplicates | sort -r
yum -y install kubelet-1.23.3 kubectl-1.23.3 kubeadm-1.23.3
systemctl enable kubelet
主节点初始化
kubeadm init \
--apiserver-advertise-address=10.0.8.11 \
--image-repository registry.aliyuncs.com/google_containers \
--kubernetes-version v1.23.3 \
--pod-network-cidr=10.244.0.0/16 --v=5
从节点加入k8s集群
kubeadm join 10.0.8.11:6443 --token arx410.32cgaxrz91rw8cet \
--discovery-token-ca-cert-hash sha256:c9f7e10e582659c73368919ebf5395237ebb799da3470ae7c417f8d48e6312b3
istio安装故障排查
kubectl get pods --all-namespaces
kubectl logs istio-egressgateway-65bdddf685-9sjnp -n istio-system
如何卸载istio
istioctl experimental uninstall --purge
kubectl delete namespace istio-system