· 6 years ago · Apr 16, 2020, 04:36 PM
1[root@kmaster ~]# cat kubeinit.log
2W0416 16:19:11.927177 1263 configset.go:202] WARNING: kubeadm cannot validate component configs for API groups [kubelet.config.k8s.io kubeproxy.config.k8s.io]
3[init] Using Kubernetes version: v1.18.1
4[preflight] Running pre-flight checks
5 [WARNING IsDockerSystemdCheck]: detected "cgroupfs" as the Docker cgroup driver. The recommended driver is "systemd". Please follow the guide at https://kubernetes.io/docs/setup/cri/
6 [WARNING FileContent--proc-sys-net-bridge-bridge-nf-call-iptables]: /proc/sys/net/bridge/bridge-nf-call-iptables contents are not set to 1
7 [WARNING Swap]: running with swap on is not supported. Please disable swap
8[preflight] Pulling images required for setting up a Kubernetes cluster
9[preflight] This might take a minute or two, depending on the speed of your internet connection
10[preflight] You can also perform this action in beforehand using 'kubeadm config images pull'
11[kubelet-start] Writing kubelet environment file with flags to file "/var/lib/kubelet/kubeadm-flags.env"
12[kubelet-start] Writing kubelet configuration to file "/var/lib/kubelet/config.yaml"
13[kubelet-start] Starting the kubelet
14[certs] Using certificateDir folder "/etc/kubernetes/pki"
15[certs] Generating "ca" certificate and key
16[certs] Generating "apiserver" certificate and key
17[certs] apiserver serving cert is signed for DNS names [kmaster kubernetes kubernetes.default kubernetes.default.svc kubernetes.default.svc.cluster.local] and IPs [10.96.0.1 10.101.139.201]
18[certs] Generating "apiserver-kubelet-client" certificate and key
19[certs] Generating "front-proxy-ca" certificate and key
20[certs] Generating "front-proxy-client" certificate and key
21[certs] Generating "etcd/ca" certificate and key
22[certs] Generating "etcd/server" certificate and key
23[certs] etcd/server serving cert is signed for DNS names [kmaster localhost] and IPs [10.101.139.201 127.0.0.1 ::1]
24[certs] Generating "etcd/peer" certificate and key
25[certs] etcd/peer serving cert is signed for DNS names [kmaster localhost] and IPs [10.101.139.201 127.0.0.1 ::1]
26[certs] Generating "etcd/healthcheck-client" certificate and key
27[certs] Generating "apiserver-etcd-client" certificate and key
28[certs] Generating "sa" key and public key
29[kubeconfig] Using kubeconfig folder "/etc/kubernetes"
30[kubeconfig] Writing "admin.conf" kubeconfig file
31[kubeconfig] Writing "kubelet.conf" kubeconfig file
32[kubeconfig] Writing "controller-manager.conf" kubeconfig file
33[kubeconfig] Writing "scheduler.conf" kubeconfig file
34[control-plane] Using manifest folder "/etc/kubernetes/manifests"
35[control-plane] Creating static Pod manifest for "kube-apiserver"
36[control-plane] Creating static Pod manifest for "kube-controller-manager"
37W0416 16:20:12.943684 1263 manifests.go:225] the default kube-apiserver authorization-mode is "Node,RBAC"; using "Node,RBAC"
38[control-plane] Creating static Pod manifest for "kube-scheduler"
39W0416 16:20:12.944823 1263 manifests.go:225] the default kube-apiserver authorization-mode is "Node,RBAC"; using "Node,RBAC"
40[etcd] Creating static Pod manifest for local etcd in "/etc/kubernetes/manifests"
41[wait-control-plane] Waiting for the kubelet to boot up the control plane as static Pods from directory "/etc/kubernetes/manifests". This can take up to 4m0s
42[apiclient] All control plane components are healthy after 25.008515 seconds
43[upload-config] Storing the configuration used in ConfigMap "kubeadm-config" in the "kube-system" Namespace
44[kubelet] Creating a ConfigMap "kubelet-config-1.18" in namespace kube-system with the configuration for the kubelets in the cluster
45[upload-certs] Skipping phase. Please see --upload-certs
46[mark-control-plane] Marking the node kmaster as control-plane by adding the label "node-role.kubernetes.io/master=''"
47[mark-control-plane] Marking the node kmaster as control-plane by adding the taints [node-role.kubernetes.io/master:NoSchedule]
48[bootstrap-token] Using token: 6xnhc7.6b6r1pbk80f6o9f4
49[bootstrap-token] Configuring bootstrap tokens, cluster-info ConfigMap, RBAC Roles
50[bootstrap-token] configured RBAC rules to allow Node Bootstrap tokens to get nodes
51[bootstrap-token] configured RBAC rules to allow Node Bootstrap tokens to post CSRs in order for nodes to get long term certificate credentials
52[bootstrap-token] configured RBAC rules to allow the csrapprover controller automatically approve CSRs from a Node Bootstrap Token
53[bootstrap-token] configured RBAC rules to allow certificate rotation for all node client certificates in the cluster
54[bootstrap-token] Creating the "cluster-info" ConfigMap in the "kube-public" namespace
55[kubelet-finalize] Updating "/etc/kubernetes/kubelet.conf" to point to a rotatable kubelet client certificate and key
56[addons] Applied essential addon: CoreDNS
57[addons] Applied essential addon: kube-proxy
58
59Your Kubernetes control-plane has initialized successfully!
60
61To start using your cluster, you need to run the following as a regular user:
62
63 mkdir -p $HOME/.kube
64 sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
65 sudo chown $(id -u):$(id -g) $HOME/.kube/config
66
67You should now deploy a pod network to the cluster.
68Run "kubectl apply -f [podnetwork].yaml" with one of the options listed at:
69 https://kubernetes.io/docs/concepts/cluster-administration/addons/
70
71Then you can join any number of worker nodes by running the following on each as root:
72
73kubeadm join 10.101.139.201:6443 --token 6xnhc7.6b6r1pbk80f6o9f4 \
74 --discovery-token-ca-cert-hash sha256:0b9f68c753c3ee72e2b3e89103c221f4c1fd06f77f06fe671b63a6cb32416baf
75RAW Paste Data