kubernetesクラスタ(v1.7.2)を2つのノードでインストールしようとしています。そしてcniとして織りを使う。kubeadm v1.7.2 hostname ""に到達できませんでした
$ yum install -y docker kubelet kubeadm kubectl kubernetes-cni
$ systemctl enable docker && systemctl start docker
$ systemctl enable kubelet && systemctl start kubelet
$ systemctl stop firewalld; systemctl disable firewalld
$ kubeadm init --apiserver-advertise-address=10.41.30.50
$ mkdir $HOME/.kube
$ cp /etc/kubernetes/admin.conf $HOME/.kube/config
#set IPALLOC_RANGE to 172.40.0.0/16 in https://git.io/weave-kube-1.6
$ kubectl apply -f weave-kube-1.6.yaml
#schedule pods on master
$ kubectl taint nodes --all node-role.kubernetes.io/master-
#disable access control
$ kubectl create clusterrolebinding permissive-binding \
--clusterrole=cluster-admin \
--user=admin \
--user=kubelet \
--group=system:serviceaccounts
# joining other node
$ kubeadm join --token c5ba8a.6bcb25f017648271 10.41.30.50:6443
:他のノードに参加すると、kubeadmは、私はCentOSの
Linux ctdpc001572.ctd.internal.com 3.10.0-514.26.2.el7.x86_64 #1 SMP Tue Jul 4 15:04:05 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
7.3にインストールyumのパッケージ
Loaded plugins: fastestmirror, langpacks, versionlock
Loading mirror speeds from cached hostfile
Installed Packages
kubeadm.x86_64 1.7.2-0 @kubernetes
kubectl.x86_64 1.7.2-0 @kubernetes
kubelet.x86_64 1.7.2-0 @kubernetes
kubernetes-cni.x86_64 0.5.1-0 @kubernetes
Available Packages
kubernetes.x86_64 1.5.2-0.7.git269f928.el7 extras
kubernetes-client.x86_64 1.5.2-0.7.git269f928.el7 extras
kubernetes-master.x86_64 1.5.2-0.7.git269f928.el7 extras
kubernetes-node.x86_64 1.5.2-0.7.git269f928.el7 extras
kubernetes-unit-test.x86_64 1.5.2-0.7.git269f928.el7 extras
の手順を使用しているホスト名の
[[email protected] ~]# kubeadm join --token c5ba8a.6bcb25f017648271 10.41.30.50:6443
[kubeadm] WARNING: kubeadm is in beta, please do not use it for production clusters.
[preflight] Running pre-flight checks
[preflight] WARNING: hostname "" could not be reached
[preflight] WARNING: hostname "" lookup : no such host
[preflight] Some fatal errors occurred:
hostname "" a DNS-1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. 'example.com', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*')
[preflight] If you know what you are doing, you can skip pre-flight checks with `--skip-preflight-checks`
を不平を言います実行中
kubeadm join --token c5ba8a.6bcb25f017648271 10.41.30.50:6443 --skip-preflight-checks
私は織り-KUBEポッドに次のエラーを参照してください。
2017/07/29 16:36:39 error contacting APIServer: Get https://10.96.0.1:443/api/v1/nodes: dial tcp 10.96.0.1:443: i/o timeout; trying with fallback: http://localhost:8080
2017/07/29 16:36:39 Could not get peers: Get http://localhost:8080/api/v1/nodes: dial tcp [::1]:8080: getsockopt: connection refused
Failed to get peers
DNS-1123は、それは私のDNS名ではありませんRFC 1123を示しています。 –