-
启动失败:Exiting due to GUEST_MISSING_CONNTRACK: Sorry, Kubernetes 1.22.3 requires conntrack to be installed in root’s path
# 解决方案
yum install -y conntrack
## 或者
sudo apt-get install -y conntrack
-
minikube启动报错
报错信息
stderr:
[WARNING Service-Docker]: docker service is not enabled, please run 'systemctl enable docker.service'
[WARNING Swap]: running with swap on is not supported. Please disable swap
[WARNING FileExisting-socat]: socat not found in system path
[WARNING Service-Kubelet]: kubelet service is not enabled, please run 'systemctl enable kubelet.service'
error execution phase preflight: [preflight] Some fatal errors occurred:
[ERROR FileContent--proc-sys-net-bridge-bridge-nf-call-iptables]: /proc/sys/net/bridge/bridge-nf-call-iptables contents are not set to 1
[ERROR SystemVerification]: unexpected kernel config: CONFIG_CGROUP_PIDS
[ERROR SystemVerification]: missing required cgroups: pids
[preflight] If you know what you are doing, you can make a check non-fatal with `--ignore-preflight-errors=...`
To see the stack trace of this error execute with --v=5 or higher
解决方案
# 普遍配置
systemctl enable docker.service
systemctl enable kubelet.service
echo "1" > /proc/sys/net/bridge/bridge-nf-call-iptables
## 关闭swap分区并将/etc/fstab中swap的哪一行注释掉,就是给哪一行最前面加个#
swapoff -a && sed -i '/ swap / s/^\(.*\)$/#\1/g' /etc/fstab
## 确认swap已经关闭
free -m ## 若都显示 0 则表示关闭成功
## socat是一个网络工具, k8s 使用它来进行 pod 的数据交互
sudo yum -y install socat ebtables ## yum install -y socat
# 升级linux内核(下图验证升级成功后生成pids文件)
## 查看当前内核版本
uname -a ## Linux nbsp 3.10.0-123.el7.x86_64 #1 SMP Mon Jun 30 12:09:22 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
cat /boot/config-`uname -r`| grep CGROUP
## 添加以下内容
CONFIG_CGROUP_PIDS=y
## 升级命令
rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org
rpm -Uvh http://www.elrepo.org/elrepo-release-7.0-2.el7.elrepo.noarch.rpm
yum --disablerepo="*" --enablerepo="elrepo-kernel" list available
yum --enablerepo=elrepo-kernel install kernel-ml
cp /etc/default/grub /etc/default/grub_bak
vi /etc/default/grub ## 设置 GRUB_DEFAULT=0 # 只需要修改这里即可
grub2-mkconfig -o /boot/grub2/grub.cfg
systemctl enable docker.service
reboot
## 重启完成后,查看内核版本是否正确
uname -r
## /etc/docker vi daemon.json (没有这个文件就新建一个)添加如下内容
{
"exec-opts": ["native.cgroupdriver=systemd"]
}
* CentOS7重启后docker启动失败
//关闭默认自带防火墙
systemctl stop firewalld && systemctl disable firewalld
-
VM is unable to access k8s.gcr.io, you may need to configure a proxy or set --image-repository
提示信息
This bare metal machine is having trouble accessing https://k8s.gcr.io
To pull new external images, you may need to configure a proxy: https://minikube.sigs.k8s.io/docs/reference/networking/proxy/
解决方案
# 删除本地集群
minikube delete
minikube start
# 使用国内代理镜像
minikube start --vm-driver=none --image-repository=registry.cn-hangzhou.aliyuncs.com/google_containers
minikube start --vm-driver=none --image-mirror-country='cn' --image-repository='registry.cn-hangzhou.aliyuncs.com/google_containers'
minikube start --vm-driver=none --registry-mirror=https://registry.docker-cn.com
minikube start --driver=docker --registry-mirror=https://dockerhub.azk8s.cn --image-repository=registry.cn-hangzhou.aliyuncs.com/google_containers
-
十分钟教会你通过minikube部署Kubernetes
https://blog.csdn.net/qq_40791253/article/details/104864586
-
centos7虚拟机安装minikube和kubectl
https://www.cnblogs.com/zhangzl419/p/15162011.html
-
安装Minikube | Kubernetes
https://v1-18.docs.kubernetes.io/zh/docs/tasks/tools/install-minikube/
-
windows安装minikube的正确姿势
https://zhuanlan.zhihu.com/p/106581787
-
一遍过,Centos7下minikube安装k8s学习环境
https://zhuanlan.zhihu.com/p/141831571
-
Minikube不能成功启动的报错分析及解决方案
https://blog.csdn.net/m0_37806791/article/details/104900429
-
k8s安装部署遇到的各种坑
https://www.modb.pro/db/188559
-
CentOS-7 升级内核
https://zhuanlan.zhihu.com/p/368879345