Kubernetes kubeadm 方式安装配置文件目录大全

        kubernetes kubeadm方式安装配置文件目录和镜像目录

  • kube-apiserver,kube-controller-manager,kube-scheduler,kubelet配置文件目录是/etc/kubernetes
find /etc/kubernetes/ -type f

        显示

/etc/kubernetes/manifests/kube-apiserver.yaml
/etc/kubernetes/manifests/kube-controller-manager.yaml
/etc/kubernetes/manifests/kube-scheduler.yaml
/etc/kubernetes/manifests/etcd.yaml
/etc/kubernetes/pki/ca.key
/etc/kubernetes/pki/ca.crt
/etc/kubernetes/pki/apiserver.key
/etc/kubernetes/pki/apiserver.crt
/etc/kubernetes/pki/apiserver-kubelet-client.key
/etc/kubernetes/pki/apiserver-kubelet-client.crt
/etc/kubernetes/pki/front-proxy-ca.key
/etc/kubernetes/pki/front-proxy-ca.crt
/etc/kubernetes/pki/front-proxy-client.key
/etc/kubernetes/pki/front-proxy-client.crt
/etc/kubernetes/pki/etcd/ca.key
/etc/kubernetes/pki/etcd/ca.crt
/etc/kubernetes/pki/etcd/server.key
/etc/kubernetes/pki/etcd/server.crt
/etc/kubernetes/pki/etcd/peer.key
/etc/kubernetes/pki/etcd/peer.crt
/etc/kubernetes/pki/etcd/healthcheck-client.key
/etc/kubernetes/pki/etcd/healthcheck-client.crt
/etc/kubernetes/pki/apiserver-etcd-client.key
/etc/kubernetes/pki/apiserver-etcd-client.crt
/etc/kubernetes/pki/sa.key
/etc/kubernetes/pki/sa.pub
/etc/kubernetes/admin.conf
/etc/kubernetes/kubelet.conf
/etc/kubernetes/controller-manager.conf
/etc/kubernetes/scheduler.conf
  • kubelet 服务配置目录是/usr/lib/systemd/system/
find /usr/lib/systemd/system/kube* -type f

        显示

/usr/lib/systemd/system/kubelet.service
/usr/lib/systemd/system/kubelet.service.d/10-kubeadm.conf
  • cni插件配置目录
find /etc/cni/net.d -type f

        显示

/etc/cni/net.d/10-flannel.conflist
  • kubernetes集群认证文件目录
cd /root/.kube/cache
ll

        显示

drwxr-x--- 3 root root   23 Mar 18 12:50 cache
-rw------- 1 root root 5450 Mar 18 12:50 config
drwxr-x--- 3 root root 4096 Mar 18 13:24 http-cache
  • kubelet启动参数配置
cd /var/lib/kubelet
ll

        显示

-rw-r--r--  1 root root  782 Mar 18 12:48 config.yaml
-rw-------  1 root root   62 Mar 18 12:49 cpu_manager_state
drwxr-xr-x  2 root root   80 Mar 18 12:59 device-plugins
-rw-r--r--  1 root root  146 Mar 18 12:48 kubeadm-flags.env
drwxr-xr-x  2 root root  124 Mar 18 12:49 pki
drwxr-x---  2 root root    6 Mar 18 12:49 plugins
drwxr-x---  2 root root    6 Mar 18 12:49 plugins_registry
drwxr-x---  2 root root   26 Mar 18 12:49 pod-resources
drwxr-x--- 10 root root 4096 Mar 18 12:59 pods

        查看master组件状态

kubectl get cs

        显示

NAME                 STATUS    MESSAGE             ERROR
scheduler            Healthy   ok                  
controller-manager   Healthy   ok                  
etcd-0               Healthy   {"health":"true"}

        查看所有系统pod状态

kubectl get pod -n kube-system

        显示

NAME    READY    STATUS    RESTARTS    AGE
coredns-7ff77c879f-9tq2p               1/1     Running   4          5d23h
coredns-7ff77c879f-jbc5m               1/1     Running   4          5d23h
etcd-kubernetes10                      1/1     Running   4          5d23h
kube-apiserver-kubernetes10            1/1     Running   4          5d23h
kube-controller-manager-kubernetes10   1/1     Running   6          5d23h
kube-flannel-ds-69sts                  1/1     Running   6          5d17h
kube-flannel-ds-bwkqz                  1/1     Running   5          5d17h
kube-flannel-ds-qdppg                  1/1     Running   5          5d23h
kube-proxy-9pmgc                       1/1     Running   4          5d23h
kube-proxy-dlx8h                       1/1     Running   4          5d17h
kube-proxy-x9drv                       1/1     Running   4          5d17h
kube-scheduler-kubernetes10            1/1     Running   5          5d23h

        查看节点的所有镜像

        master节点的镜像
  • 查看拉取的镜像
docker images

        显示

REPOSITORY    TAG    IMAGE ID    CREATED    SIZE
rancher/mirrored-flannelcni-flannel    
v0.17.0   9247abf08677   2 weeks ago     59.8MB
rancher/mirrored-flannelcni-flannel-cni-plugin    
v1.0.1    ac40ce625740   2 months ago    8.1MB
registry.aliyuncs.com/google_containers/kube-proxy    
v1.18.0   43940c34f24f   24 months ago   117MB
registry.aliyuncs.com/google_containers/kube-controller-manager    
v1.18.0   d3e55153f52f   24 months ago   162MB
registry.aliyuncs.com/google_containers/kube-scheduler    
v1.18.0   a31f78c7c8ce   24 months ago   95.3MB
registry.aliyuncs.com/google_containers/kube-apiserver    
v1.18.0   74060cea7f70   24 months ago   173MB
registry.aliyuncs.com/google_containers/pause    
3.2       80d28bedfe5d   2 years ago     683kB
registry.aliyuncs.com/google_containers/coredns    
1.6.7     67da37a9a360   2 years ago     43.8MB
registry.aliyuncs.com/google_containers/etcd    
3.4.3-0   303ce5db0e90   2 years ago     288MB
  • 查看运行的容器
docker ps

        显示

CONTAINER ID   IMAGE                                               COMMAND                  CREATED       STATUS       PORTS     NAMES
bdfa9bfc6362   d3e55153f52f                                        "kube-controller-man…"   3 hours ago   Up 3 hours             k8s_kube-controller-manager_kube-controller-manager-kubernetes10_kube-system_c4d2dd4abfffdee4d424ce839b0de402_1
092e6de8fb4d   a31f78c7c8ce                                        "kube-scheduler --au…"   3 hours ago   Up 3 hours             k8s_kube-scheduler_kube-scheduler-kubernetes10_kube-system_ca2aa1b3224c37fa1791ef6c7d883bbe_1
0728efb5454c   67da37a9a360                                        "/coredns -conf /etc…"   6 hours ago   Up 6 hours             k8s_coredns_coredns-7ff77c879f-9tq2p_kube-system_29b31769-b8bd-4129-b148-1dd190497af8_0
53e91091e9b7   67da37a9a360                                        "/coredns -conf /etc…"   6 hours ago   Up 6 hours             k8s_coredns_coredns-7ff77c879f-jbc5m_kube-system_7e260fd5-f960-4c56-96f4-a767164c547a_0
126942adfffe   registry.aliyuncs.com/google_containers/pause:3.2   "/pause"                 6 hours ago   Up 6 hours             k8s_POD_coredns-7ff77c879f-jbc5m_kube-system_7e260fd5-f960-4c56-96f4-a767164c547a_0
241127dfe2e1   registry.aliyuncs.com/google_containers/pause:3.2   "/pause"                 6 hours ago   Up 6 hours             k8s_POD_coredns-7ff77c879f-9tq2p_kube-system_29b31769-b8bd-4129-b148-1dd190497af8_0
fdb933ef584a   9247abf08677                                        "/opt/bin/flanneld -…"   6 hours ago   Up 6 hours             k8s_kube-flannel_kube-flannel-ds-qdppg_kube-system_a30c6033-0e60-4a5e-aa34-63971513951b_0
9c91a0552675   registry.aliyuncs.com/google_containers/pause:3.2   "/pause"                 6 hours ago   Up 6 hours             k8s_POD_kube-flannel-ds-qdppg_kube-system_a30c6033-0e60-4a5e-aa34-63971513951b_0
4bed22e4e731   43940c34f24f                                        "/usr/local/bin/kube…"   6 hours ago   Up 6 hours             k8s_kube-proxy_kube-proxy-9pmgc_kube-system_a537ec99-9ab4-4a3e-bfac-e91963dcd3bd_0
0982869dc3ab   registry.aliyuncs.com/google_containers/pause:3.2   "/pause"                 6 hours ago   Up 6 hours             k8s_POD_kube-proxy-9pmgc_kube-system_a537ec99-9ab4-4a3e-bfac-e91963dcd3bd_0
d5f9cc22962b   74060cea7f70                                        "kube-apiserver --ad…"   6 hours ago   Up 6 hours             k8s_kube-apiserver_kube-apiserver-kubernetes10_kube-system_680b917d8ca77b68dcd2defc3cc4f2f3_0
c5dc0000f630   303ce5db0e90                                        "etcd --advertise-cl…"   6 hours ago   Up 6 hours             k8s_etcd_etcd-kubernetes10_kube-system_9ea67b1fc254e2d4a14301a0a04b99ff_0
9e2627c7b949   registry.aliyuncs.com/google_containers/pause:3.2   "/pause"                 6 hours ago   Up 6 hours             k8s_POD_kube-scheduler-kubernetes10_kube-system_ca2aa1b3224c37fa1791ef6c7d883bbe_0
8dedf6bd2a1a   registry.aliyuncs.com/google_containers/pause:3.2   "/pause"                 6 hours ago   Up 6 hours             k8s_POD_kube-apiserver-kubernetes10_kube-system_680b917d8ca77b68dcd2defc3cc4f2f3_0
c0c526e67e7a   registry.aliyuncs.com/google_containers/pause:3.2   "/pause"                 6 hours ago   Up 6 hours             k8s_POD_kube-controller-manager-kubernetes10_kube-system_c4d2dd4abfffdee4d424ce839b0de402_0
fff311c79d86   registry.aliyuncs.com/google_containers/pause:3.2   "/pause"                 6 hours ago   Up 6 hours             k8s_POD_etcd-kubernetes10_kube-system_9ea67b1fc254e2d4a14301a0a04b99ff_0

        node节点的镜像

  • 查看拉取的镜像
docker images

        显示

REPOSITORY    TAG    IMAGE ID    CREATED    SIZE
rancher/mirrored-flannelcni-flannel    
v0.17.0   9247abf08677   2 weeks ago     59.8MB
rancher/mirrored-flannelcni-flannel-cni-plugin    
v1.0.1    ac40ce625740   2 months ago    8.1MB
registry.aliyuncs.com/google_containers/kube-proxy    
v1.18.0   43940c34f24f   24 months ago   117MB
registry.aliyuncs.com/google_containers/pause    
3.2       80d28bedfe5d   2 years ago     683kB
  • 查看运行的容器
docker ps

        显示

CONTAINER ID    IMAGE    COMMAND    CREATED    STATUS    PORTS    NAMES
828bee2b3b00    9247abf08677    
"/opt/bin/flanneld -…"    29 minutes ago    Up 29 minutes    k8s_kube-flannel_kube-flannel-ds-69sts_kube-system_b324990f-49b0-43be-ab1e-b7ffe5f538f4_0
2974fd40d053    registry.aliyuncs.com/google_containers/kube-proxy   "/usr/local/bin/kube…"   29 minutes ago    Up 29 minutes             k8s_kube-proxy_kube-proxy-x9drv_kube-system_4db084e0-6e43-4d8f-970e-76ba625b2327_0
97963b0da3c6    registry.aliyuncs.com/google_containers/pause:3.2    
"/pause"    30 minutes ago    Up 30 minutes    k8s_POD_kube-proxy-x9drv_kube-system_4db084e0-6e43-4d8f-970e-76ba625b2327_0
c95e48a73cda    registry.aliyuncs.com/google_containers/pause:3.2    
"/pause"    30 minutes ago    Up 30 minutes    k8s_POD_kube-flannel-ds-69sts_kube-system_b324990f-49b0-43be-ab1e-b7ffe5f538f4_0

你可能感兴趣的:(Kubernetes,kubernetes,java,容器)