[kubeadm] WARNING: kubeadm is
in beta, please do not use it for production clusters.
[init] Using Kubernetes version: v1.
6.2
[init] Using Authorization mode: RBAC
[preflight] Running pre
-flight checks
[preflight] Starting the kubelet service
[certificates] Generated CA certificate and key.
[certificates] Generated API server certificate and key.
[certificates] API Server serving cert is signed
for DNS names [node0 kubernetes kubernetes.default kubernetes.default.svc kubernetes.default.svc.cluster.local] and IPs [10.96.0.1 192.168.144.2]
[certificates] Generated API server kubelet client certificate and key.
[certificates] Generated service account token signing key and public key.
[certificates] Generated front
-proxy CA certificate and key.
[certificates] Generated front
-proxy client certificate and key.
[certificates] Valid certificates and keys now exist
in "/etc/kubernetes/pki"
[kubeconfig] Wrote KubeConfig
file to disk: "/etc/kubernetes/admin.conf"
[kubeconfig] Wrote KubeConfig
file to disk: "/etc/kubernetes/kubelet.conf"
[kubeconfig] Wrote KubeConfig
file to disk: "/etc/kubernetes/controller-manager.conf"
[kubeconfig] Wrote KubeConfig
file to disk: "/etc/kubernetes/scheduler.conf"
[apiclient] Created API client, waiting
for the control plane to become ready
[apiclient] All control plane components are healthy after
14.583864 seconds
[apiclient] Waiting
for at least one node to register
[apiclient] First node has registered after
6.008990 seconds
[token] Using token: e7986d.e440de5882342711
[apiconfig] Created RBAC rules
[addons] Created essential addon: kube
-proxy
[addons] Created essential addon: kube
-dns
Your Kubernetes master has initialized successfully
!
To start using your cluster, you need to run (as a regular user):
kubectl run curl --image=radial/busyboxplus:curl -i --tty
接着会先是如下内容
Waiting for pod default/curl-2421989462-vldmp to be running, status is Pending, pod ready: false
Waiting
for pod default/curl-2421989462-vldmp to be running, status is Pending, pod ready: false
If you don
't see a command prompt, try pressing enter.
[ root@curl-2421989462-vldmp:/ ]$
kubeadm join --token e7986d.e440de5882342711 192.168.144.2:6443
[kubeadm] WARNING: kubeadm is
in beta, please do not use it for production clusters.
[preflight] Running pre
-flight checks
[discovery] Trying to connect to API Server
"192.168.144.2:6443"
[discovery] Created cluster
-info discovery client, requesting info from "https://192.168.144.2:6443"
[discovery] Cluster
info signature and contents are valid, will use API Server "https://192.168.144.2:6443"
[discovery] Successfully established connection with API Server
"192.168.61.41:6443"
[bootstrap] Detected server version: v1.
6.2
[bootstrap] The server supports the Certificates API (certificates.k8s.io
/v1beta1)
[csr] Created API client to obtain unique certificate
for this node, generating keys and certificate signing request
[csr] Received signed certificate from the API server, generating KubeConfig...
[kubeconfig] Wrote KubeConfig
file to disk: "/etc/kubernetes/kubelet.conf"
Node
join complete:
* Certificate signing request sent to master and response
received.
* Kubelet informed of new secure connection details.
Run
'kubectl get nodes' on the master to see this machine join.