Kubernetes - profile directory structure

The configuration directories for Kubernetes include / etc/kubernetes, / home/supermap/.kube, and / var/lib/kubelet. Let's take a look at what fi...
1. kubernetes main configuration directory
2. kubernetes user configuration directory
3. Configuration directory of kubelet service
Further reference:

The configuration directories for Kubernetes include / etc/kubernetes, / home/supermap/.kube, and / var/lib/kubelet.

Let's take a look at what files are in these directories (Ubuntu 18.04LTS desktop is used for the operating system).

To install the tree command:

sudo apt install tree

1. kubernetes main configuration directory

Display / etc/kubernetes directory structure:

supermap@podc01:/etc/kubernetes$ tree . . ├── admin.conf ├── controller-manager.conf ├── kubelet.conf ├── manifests │ ├── etcd.yaml │ ├── kube-apiserver.yaml │ ├── kube-controller-manager.yaml │ └── kube-scheduler.yaml ├── pki │ ├── apiserver.crt │ ├── apiserver-etcd-client.crt │ ├── apiserver-etcd-client.key │ ├── apiserver.key │ ├── apiserver-kubelet-client.crt │ ├── apiserver-kubelet-client.key │ ├── ca.crt │ ├── ca.key │ ├── etcd │ │ ├── ca.crt │ │ ├── ca.key │ │ ├── healthcheck-client.crt │ │ ├── healthcheck-client.key │ │ ├── peer.crt │ │ ├── peer.key │ │ ├── server.crt │ │ └── server.key │ ├── front-proxy-ca.crt │ ├── front-proxy-ca.key │ ├── front-proxy-client.crt │ ├── front-proxy-client.key │ ├── sa.key │ └── sa.pub ├── scheduler.conf └── tmp [error opening dir] 4 directories, 30 files

2. kubernetes user configuration directory

The hidden directory. kube under the main user directory contains the user's configuration parameters and cache data. The directory structure is:

/home/supermap/.kube ├── cache │ └── discovery │ ├── 10.1.1.181_6443 │ └── 10.1.1.201_6443 ├── config └── http-cache ├── 028d83935e12ce471cbe29f4096ef4ed

The content of configuration file config is:

apiVersion: v1 clusters: - cluster: certificate-authority-data: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0t... server: https://10.1.1.201:6443 name: kubernetes contexts: - context: cluster: kubernetes user: kubernetes-admin name: kubernetes-admin@kubernetes current-context: kubernetes-admin@kubernetes kind: Config preferences: {} users: - name: kubernetes-admin user: client-certificate-data: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1... client-key-data: LS0tLS1CRUdJTiBSU0EgUFJJVkFURSBLRVktLS0tLQpNSUl...

3. Configuration directory of kubelet service

Each ks node needs to run the kubelet service. The configuration of the kubelet service is in the directory / var/lib/kubelet:

supermap@podc01:/var/lib/kubelet$ tree . ├── config.yaml ├── cpu_manager_state ├── device-plugins │ ├── DEPRECATION │ ├── kubelet_internal_checkpoint │ └── kubelet.sock ├── kubeadm-flags.env ├── pki │ ├── kubelet-client-2018-11-23-10-08-12.pem │ ├── kubelet-client-2018-11-23-10-08-38.pem │ ├── kubelet-client-current.pem -> /var/lib/kubelet/pki/kubelet-client-2018-11-23-10-08-38.pem │ ├── kubelet.crt │ └── kubelet.key ├── plugin-containers [error opening dir] ├── plugins [error opening dir] ├── plugins_registry [error opening dir] ├── pod-resources [error opening dir] └── pods [error opening dir] 7 directories, 11 files

2 December 2019, 00:15 | Views: 1451

Add new comment

For adding a comment, please log in
or create account

0 comments