criSocket: unix:///var/run/cri-dockerd.sock
criSocket: unix:///var/run/containerd/containerd.sock
root@master1 ~/k8s/]# kubeadm init --config=/root/k8s/kubeadm/config.yaml --upload-certs
[init] Using Kubernetes version: v1.26.0
[preflight] Running pre-flight checks
[WARNING FileExisting-tc]: tc not found in system path
[preflight] Pulling images required for setting up a Kubernetes cluster
[preflight] This might take a minute or two, depending on the speed of your internet connection
[preflight] You can also perform this action in beforehand using 'kubeadm config images pull'
...
Your Kubernetes control-plane has initialized successfully!
To start using your cluster, you need to run the following as a regular user:
mkdir -p $HOME/.kube
sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
sudo chown $(id -u):$(id -g) $HOME/.kube/config
apiVersion: kubeadm.k8s.io/v1beta3
kind: InitConfiguration
nodeRegistration:
criSocket: unix:///var/run/cri-dockerd.sock
kubeletExtraArgs:
runtime-cgroups: /system.slice/docker.service
pod-infra-container-image: registry.cn-hangzhou.aliyuncs.com/google_containers/pause:3.7
---
apiVersion: kubeproxy.config.k8s.io/v1alpha1
kind: KubeProxyConfiguration
mode: ipvs
ipvs:
minSyncPeriod: 8s
syncPeriod: 8s
scheduler: 'wrr'
....(省略其他配置)
kubeadm config print init-defaults
后 输出的实际配置日志[root@master1 k8s]# kubeadm config print init-defaults
apiVersion: kubeadm.k8s.io/v1beta3
bootstrapTokens:
- groups:
- system:bootstrappers:kubeadm:default-node-token
token: abcdef.0123456789abcdef
ttl: 24h0m0s
usages:
- signing
- authentication
kind: InitConfiguration
localAPIEndpoint:
advertiseAddress: 1.2.3.4
bindPort: 6443
nodeRegistration:
criSocket: unix:///var/run/containerd/containerd.sock
imagePullPolicy: IfNotPresent
name: node
taints: null
---
.....(省略其他配置)
1
zed1018 2023-03-19 12:00:49 +08:00
op 有点厉害,手动部署集群么。我是直接用的 k3s
|
2
OldCarMan OP @zed1018 主要是想顺便熟悉一下 k8s 环境,以后遇到问题定位起来可能会快些;另外熟悉一些常用配置,可能也有利于后面快速调优需要;
哈哈,夹点东西:不过做任何事情都有潜在的价值判断和价值取向,时间等各种资源允许,很多东西当然多多益善,但大部分时候,可能是鱼和熊掌的关系。 |
3
seers 2023-03-19 16:25:53 +08:00
/var/run/cri-dockerd.sock
你看下有没有这个,我记得是轮询,如果没有就找下一个 |
5
runzhliu 2023-03-21 17:19:06 +08:00
--v 10 打印一下 debug 的日志
|
6
OldCarMan OP @runzhliu 谢谢回复,我的问题,这个指令返回的是,kubeadm config 默认的配置,而不是 manual 配置。
|
7
OldCarMan OP 这个指令“kubeadm config print init-defaults”
|