kubernetes install scripts,that includes etcd、kubernetes、flannel、docker,and there are many yaml files here,for example the kubernetes addones,redis,rabbitmq,mongo,traefik,ingress-nginx,cpehfs and so on.
[etcd] Wrote Static Pod manifest for a local etcd instance to "/etc/kubernetes/manifests/etcd.yaml"
[init] Waiting for the kubelet to boot up the control plane as Static Pods from directory "/etc/kubernetes/manifests".
[init] This might take a minute or longer if the control plane images have to be pulled.
然后很 久后 就失败了 提示的是 TLS handshake timeout
[root@k8s ~]# kubectl create -f kubedns-controller.yaml
error: error validating "kubedns-controller.yaml": error validating data: [found invalid field tolerations for v1.PodSpec, found invalid field optional for v1.ConfigMapVolumeSource]; if you choose to ignore these errors, turn validation off with --validate=false
根据教程部署,Etcd 成功了,但是使用kubectl get nodes报错,The connection to the server localhost:8080 was refused - did you specify the right host or port?
是否还需要添加kubectl的配置文件?
按照教程,先运行master,然后按照提示处理admin.conf,然后在另一台机器上运行node,在node机器上
[root@bigbangtest1st] /etc/kubernetes/manifests$ kubeadm join --token 863f67.19babbff7bfe8543 172.18.0.16:6443 --skip-preflight-checks
[kubeadm] WARNING: kubeadm is in beta, please do not use it for production clusters.
[preflight] Skipping pre-flight checks
[discovery] Trying to connect to API Server "172.18.0.16:6443"
[discovery] Created cluster-info discovery client, requesting info from "https://172.18.0.16:6443"
[discovery] Cluster info signature and contents are valid, will use API Server "https://172.18.0.16:6443"
[discovery] Successfully established connection with API Server "172.18.0.16:6443"
[bootstrap] Detected server version: v1.7.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.
failed to run Kubelet: Running with swap on is not supported, please disable swap! or set --fail-swap-on flag to false. /proc/swaps contained: [Filename#011#011#011#011Type#011#011Size#011Used#011Priority /dev/dm-1