1

问题

kubeadm init 安装的 etcd 的配置文件在哪里?

背景

跟随使用 kubeadm 创建集群并注意到没有手动安装 etcd 的步骤,因此 kubeadm init 应该正在安装它。

运行下面尝试查看哪些文件但找不到线索。

for i in $(ls /proc/$(pgrep etcd)/fd) ; do readlink $i; done | grep -v socket
pipe:[432740]
pipe:[432741]
/var/lib/etcd/member/wal/0.tmp
pipe:[432742]
anon_inode:[eventpoll]
/var/lib/etcd/member/snap/db
/var/lib/etcd/member/wal/0000000000000000-0000000000000000.wal
/var/lib/etcd/member/wal
4

1 回答 1

4

/etc/kubernetesKubeadm 初始化并在目录中为 kubelet提供足够的文件。

[certificates] Valid certificates and keys now exist in "/etc/kubernetes/pki"
[kubeconfig] Wrote KubeConfig file to disk: "admin.conf"
[kubeconfig] Wrote KubeConfig file to disk: "kubelet.conf"
[kubeconfig] Wrote KubeConfig file to disk: "controller-manager.conf"
[kubeconfig] Wrote KubeConfig file to disk: "scheduler.conf"
[etcd] Wrote Static Pod manifest for a local etcd instance to "/etc/kubernetes/manifests/etcd.yaml"

如您所见,在/etc/kubernetes/manifests/目录中为 kubelet 准备了必要的清单文件。

[init] Waiting for the kubelet to boot up the control plane as Static Pods from directory "/etc/kubernetes/manifests"

现在 Kubelet 将应用这些清单文件,并且控制平面将启动并运行。

于 2017-12-12T10:20:56.453 回答