.Info{Major:"1", Minor:"7", GitVersion:"v1.7.3", GitCommit:"2c2fe6e8278a5db2d15a013987b53968c743f2a1", GitTreeState:"clean", BuildDate:"2017-08-03T06:43:48Z", GoVersion:"go1.8.3", Compiler:"gc", Platform:"linux/amd64"} start loading image from cni-v1.9.1.tar
4ac76077f2c7: Loading layer [==================================================>] 1.309 MB/1.309 MB
a7cb87a48838: Loading layer [==================================================>] 28.74 MB/28.74 MB
8f94b23aee7f: Loading layer [==================================================>] 2.918 MB/2.918 MB
3955ff59d794: Loading layer [==================================================>] 3.174 MB/3.174 MB
eb4dd7084263: Loading layer [==================================================>] 3.11 MB/3.11 MB
86f88a4f075c: Loading layer [==================================================>] 3.668 MB/3.668 MB
b45bd27da792: Loading layer [==================================================>] 28.12 MB/28.12 MB
53819f87f731: Loading layer [==================================================>] 7.68 kB/7.68 kB
e532460262ad: Loading layer [==================================================>] 2.56 kB/2.56 kB
Loaded image: quay.io/calico/cni:v1.9.1
finish loading image from cni-v1.9.1.tar
start loading image from etcd-2.2.1.tar
d7f400ce6d52: Loading layer [==================================================>] 1.311 MB/1.311 MB
5f70bf18a086: Loading layer [==================================================>] 1.024 kB/1.024 kB
ab3a508cf77a: Loading layer [==================================================>] 14.36 MB/14.36 MB
48221bede375: Loading layer [==================================================>] 12.72 MB/12.72 MB
Loaded image: gcr.io/google_containers/etcd:2.2.1
finish loading image from etcd-2.2.1.tar
start loading image from etcd-amd64-3.0.17.tar
38ac8d0f5bb3: Loading layer [==================================================>] 1.312 MB/1.312 MB
c872b2c2ac77: Loading layer [==================================================>] 136.7 MB/136.7 MB
be71b2a80bbd: Loading layer [==================================================>] 31.16 MB/31.16 MB
Loaded image: gcr.io/google_containers/etcd-amd64:3.0.17
finish loading image from etcd-amd64-3.0.17.tar
start loading image from heapster-amd64-v1.3.0.tar
ea2709de02c6: Loading layer [==================================================>] 67.83 MB/67.83 MB
5d7687e1467b: Loading layer [==================================================>] 281.1 kB/281.1 kB
Loaded image: gcr.io/google_containers/heapster-amd64:v1.3.0
finish loading image from heapster-amd64-v1.3.0.tar
start loading image from heapster-grafana-amd64-v4.4.1.tar
3a1dff9afffd: Loading layer [==================================================>] 1.309 MB/1.309 MB
0b7419f4d518: Loading layer [==================================================>] 147.5 MB/147.5 MB
4356414d9c01: Loading layer [==================================================>] 230.4 kB/230.4 kB
aa0476299350: Loading layer [==================================================>] 2.56 kB/2.56 kB
08d1e7ee379c: Loading layer [==================================================>] 5.606 MB/5.606 MB
Loaded image: gcr.io/google_containers/heapster-grafana-amd64:v4.4.1
finish loading image from heapster-grafana-amd64-v4.4.1.tar
start loading image from heapster-influxdb-amd64-v1.1.1.tar
7da815924651: Loading layer [==================================================>] 10.48 MB/10.48 MB
2d447b9e914f: Loading layer [==================================================>] 5.12 kB/5.12 kB
Loaded image: gcr.io/google_containers/heapster-influxdb-amd64:v1.1.1
finish loading image from heapster-influxdb-amd64-v1.1.1.tar
start loading image from k8s-dns-dnsmasq-nanny-amd64-1.14.4.tar
404361ced64e: Loading layer [==================================================>] 4.221 MB/4.221 MB
27ddb9bf7c7f: Loading layer [==================================================>] 2.56 kB/2.56 kB
d25529a0371e: Loading layer [==================================================>] 353.3 kB/353.3 kB
54203c72264a: Loading layer [==================================================>] 3.072 kB/3.072 kB
780626a0e8a7: Loading layer [==================================================>] 37.1 MB/37.1 MB
Loaded image: gcr.io/google_containers/k8s-dns-dnsmasq-nanny-amd64:1.14.4
finish loading image from k8s-dns-dnsmasq-nanny-amd64-1.14.4.tar
start loading image from k8s-dns-kube-dns-amd64-1.14.4.tar
8963368d3c63: Loading layer [==================================================>] 45.42 MB/45.42 MB
Loaded image: gcr.io/google_containers/k8s-dns-kube-dns-amd64:1.14.4
finish loading image from k8s-dns-kube-dns-amd64-1.14.4.tar
start loading image from k8s-dns-sidecar-amd64-1.14.4.tar
410275e4fd45: Loading layer [==================================================>] 37.86 MB/37.86 MB
Loaded image: gcr.io/google_containers/k8s-dns-sidecar-amd64:1.14.4
finish loading image from k8s-dns-sidecar-amd64-1.14.4.tar
start loading image from kube-apiserver-amd64-v1.7.3.tar
08c2295a7fa5: Loading layer [==================================================>] 1.337 MB/1.337 MB
ec4ce0a87c77: Loading layer [==================================================>] 185 MB/185 MB
Loaded image: gcr.io/google_containers/kube-apiserver-amd64:v1.7.3
finish loading image from kube-apiserver-amd64-v1.7.3.tar
start loading image from kube-controller-manager-amd64-v1.7.3.tar
33d810afef46: Loading layer [==================================================>] 136.8 MB/136.8 MB
Loaded image: gcr.io/google_containers/kube-controller-manager-amd64:v1.7.3
finish loading image from kube-controller-manager-amd64-v1.7.3.tar
start loading image from kube-policy-controller-v0.6.0.tar
ba2cc2690e31: Loading layer [==================================================>] 5.054 MB/5.054 MB
c444d31fcd1a: Loading layer [==================================================>] 40.45 kB/40.45 kB
88b1cd542173: Loading layer [==================================================>] 16.38 kB/16.38 kB
d5f7526f0847: Loading layer [==================================================>] 2.56 kB/2.56 kB
3489efdaec5d: Loading layer [==================================================>] 18.09 MB/18.09 MB
a5081f12b4ac: Loading layer [==================================================>] 1.536 kB/1.536 kB
cfb4fd1f8292: Loading layer [==================================================>] 1.536 kB/1.536 kB
726c64df6a71: Loading layer [==================================================>] 2.048 kB/2.048 kB
Loaded image: quay.io/calico/kube-policy-controller:v0.6.0
finish loading image from kube-policy-controller-v0.6.0.tar
start loading image from kube-proxy-amd64-v1.7.3.tar
d066a55459dd: Loading layer [==================================================>] 42.04 MB/42.04 MB
49f29dc1ad67: Loading layer [==================================================>] 4.744 MB/4.744 MB
8c65f76a6011: Loading layer [==================================================>] 69.7 MB/69.7 MB
Loaded image: gcr.io/google_containers/kube-proxy-amd64:v1.7.3
finish loading image from kube-proxy-amd64-v1.7.3.tar
start loading image from kubernetes-dashboard-amd64-v1.6.3.tar
8fc4262856aa: Loading layer [==================================================>] 139.3 MB/139.3 MB
Loaded image: gcr.io/google_containers/kubernetes-dashboard-amd64:v1.6.3
finish loading image from kubernetes-dashboard-amd64-v1.6.3.tar
start loading image from kube-scheduler-amd64-v1.7.3.tar
60d9b2d06402: Loading layer [==================================================>] 76.08 MB/76.08 MB
Loaded image: gcr.io/google_containers/kube-scheduler-amd64:v1.7.3
finish loading image from kube-scheduler-amd64-v1.7.3.tar
start loading image from node-v1.3.0.tar
3fb66f713c9f: Loading layer [==================================================>] 4.221 MB/4.221 MB
e2bbb308de0b: Loading layer [==================================================>] 7.516 MB/7.516 MB
bb58c8e5a444: Loading layer [==================================================>] 249.9 kB/249.9 kB
da5e0c38fd82: Loading layer [==================================================>] 4.681 MB/4.681 MB
f9ffab325a8b: Loading layer [==================================================>] 240.5 MB/240.5 MB
Loaded image: quay.io/calico/node:v1.3.0
finish loading image from node-v1.3.0.tar
start loading image from pause-amd64-3.0.tar
5f70bf18a086: Loading layer [==================================================>] 1.024 kB/1.024 kB
41ff149e94f2: Loading layer [==================================================>] 748.5 kB/748.5 kB
Loaded image: gcr.io/google_containers/pause-amd64:3.0
finish loading image from pause-amd64-3.0.tar
[preflight] Running pre-flight checks
[reset] Stopping the kubelet service
[reset] Unmounting mounted directories in "/var/lib/kubelet"
[reset] Removing kubernetes-managed containers
[reset] No etcd manifest found in "/etc/kubernetes/manifests/etcd.yaml", assuming external etcd.
[reset] Deleting contents of stateful directories: [/var/lib/kubelet /etc/cni/net.d /var/lib/dockershim]
[reset] Deleting contents of config directories: [/etc/kubernetes/manifests /etc/kubernetes/pki]
[reset] Deleting files: [/etc/kubernetes/admin.conf /etc/kubernetes/kubelet.conf /etc/kubernetes/controller-manager.conf /etc/kubernetes/scheduler.conf]
[kubeadm] WARNING: kubeadm is in beta, please do not use it for production clusters.
[init] Using Kubernetes version: v1.7.3
[init] Using Authorization modes: [Node RBAC]
[preflight] Running pre-flight checks
[preflight] Starting the kubelet service
[kubeadm] WARNING: starting in 1.8, tokens expire after 24 hours by default (if you require a non-expiring token use --token-ttl 0)
[certificates] Generated CA certificate and key.
[certificates] Generated API server certificate and key.
[certificates] API Server serving cert is signed for DNS names [k8s-1 kubernetes kubernetes.default kubernetes.default.svc kubernetes.default.svc.cluster.local] and IPs [10.96.0.1 192.168.133.44]
[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 32.501021 seconds
[token] Using token: e35778.736fd8c0e78e6e5c
[apiconfig] Created RBAC rules
[addons] Applied essential addon: kube-proxy
[addons] Applied essential addon: kube-dns
Your Kubernetes master has initialized successfully!
To start using your cluster, you need to run (as a regular user):
mkdir -p $HOME/.kube
sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
sudo chown $(id -u):$(id -g) $HOME/.kube/config
You should now deploy a pod network to the cluster.
Run "kubectl apply -f [podnetwork].yaml" with one of the options listed at:
http://kubernetes.io/docs/admin/addons/
You can now join any number of machines by running the following on each node
as root:
kubeadm join --token e35778.736fd8c0e78e6e5c 192.168.133.44:6443
configmap "calico-config" created
daemonset "calico-etcd" created
service "calico-etcd" created
daemonset "calico-node" created
deployment "calico-policy-controller" created
clusterrolebinding "calico-cni-plugin" created
clusterrole "calico-cni-plugin" created
serviceaccount "calico-cni-plugin" created
clusterrolebinding "calico-policy-controller" created
clusterrole "calico-policy-controller" created
serviceaccount "calico-policy-controller" created
serviceaccount "kubernetes-dashboard" created
clusterrolebinding "kubernetes-dashboard" created
deployment "kubernetes-dashboard" created
service "kubernetes-dashboard" created
clusterrolebinding "heapster" created
deployment "monitoring-influxdb" created
service "monitoring-influxdb" created
serviceaccount "heapster" created
deployment "heapster" created
service "heapster" created
deployment "monitoring-grafana" created
service "monitoring-grafana" created
[iyunv@k8s-1 master]#
##############################################
### node节点详细的流程 ###
##############################################
[iyunv@k8s-2 k8s-v1.7.3]# sh generate.sh
开始生成master所需文件,请稍等。。。
开始生成node所需文件,请稍等。。。
成功!请将output下master目录及node目录上传到要部署k8s集群的master节点及node节点,然后在node上执行kubeadm join命令加入集群
[iyunv@k8s-2 k8s-v1.7.3]# cd output/
[iyunv@k8s-2 output]# ll
total 0
drwxr-xr-x 7 root root 83 Dec 16 21:32 master
drwxr-xr-x 6 root root 70 Dec 16 21:32 node
[iyunv@k8s-2 output]# cd node/
[iyunv@k8s-2 node]# ll
total 12
drwxr-xr-x 2 root root 4096 Dec 16 21:32 image
-rw-r--r-- 1 root root 120 Dec 16 21:32 init.sh
drwxr-xr-x 2 root root 20 Dec 16 21:32 kubectl
drwxr-xr-x 2 root root 4096 Dec 16 21:32 repo
drwxr-xr-x 2 root root 116 Dec 16 21:32 script
[iyunv@k8s-2 node]# sh init.sh
Client Version: version.Info{Major:"1", Minor:"7", GitVersion:"v1.7.3", GitCommit:"2c2fe6e8278a5db2d15a013987b53968c743f2a1", GitTreeState:"clean", BuildDate:"2017-08-03T07:00:21Z", GoVersion:"go1.8.3", Compiler:"gc", Platform:"linux/amd64"}
The connection to the server localhost:8080 was refused - did you specify the right host or port?
setenforce: SELinux is disabled
Loaded plugins: fastestmirror, langpacks
Resolving Dependencies
--> Running transaction check
---> Package kubeadm.x86_64 0:1.7.5-0 will be erased
---> Package kubectl.x86_64 0:1.7.5-0 will be erased
---> Package kubelet.x86_64 0:1.7.5-0 will be erased
--> Processing Dependency: kubelet for package: kubernetes-cni-0.5.1-0.x86_64
---> Package socat.x86_64 0:1.7.3.2-2.el7 will be erased
--> Running transaction check
---> Package kubernetes-cni.x86_64 0:0.5.1-0 will be erased
--> Finished Dependency Resolution
base/7/x86_64 | 3.6 kB 00:00:00
extras/7/x86_64 | 3.4 kB 00:00:00
extras/7/x86_64/primary_db | 145 kB 00:00:00
kubernetes | 1.3 kB 00:00:00
updates/7/x86_64 | 3.4 kB 00:00:00
Dependencies Resolved
==================================================================================================================================================================================================================
Package Arch Version Repository > ==================================================================================================================================================================================================================
Removing:
kubeadm x86_64 1.7.5-0 @kubernetes 49 M
kubectl x86_64 1.7.5-0 @kubernetes 49 M
kubelet x86_64 1.7.5-0 @kubernetes 96 M
socat x86_64 1.7.3.2-2.el7 @base 1.1 M
Removing for dependencies:
kubernetes-cni x86_64 0.5.1-0 @kubernetes 28 M
Transaction Summary
==================================================================================================================================================================================================================
Remove 4 Packages (+1 Dependent package)
Installed> Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Erasing : kubeadm-1.7.5-0.x86_64 1/5
Erasing : kubelet-1.7.5-0.x86_64 2/5
Erasing : kubernetes-cni-0.5.1-0.x86_64 3/5
Erasing : kubectl-1.7.5-0.x86_64 4/5
Erasing : socat-1.7.3.2-2.el7.x86_64 5/5
Verifying : kubectl-1.7.5-0.x86_64 1/5
Verifying : kubernetes-cni-0.5.1-0.x86_64 2/5
Verifying : socat-1.7.3.2-2.el7.x86_64 3/5
Verifying : kubeadm-1.7.5-0.x86_64 4/5
Verifying : kubelet-1.7.5-0.x86_64 5/5
Removed:
kubeadm.x86_64 0:1.7.5-0 kubectl.x86_64 0:1.7.5-0 kubelet.x86_64 0:1.7.5-0 socat.x86_64 0:1.7.3.2-2.el7
Dependency Removed:
kubernetes-cni.x86_64 0:0.5.1-0
Complete!
Loaded plugins: fastestmirror, langpacks
Examining ../repo/socat-1.7.3.2-1.1.el7.x86_64.rpm: socat-1.7.3.2-1.1.el7.x86_64
Marking ../repo/socat-1.7.3.2-1.1.el7.x86_64.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package socat.x86_64 0:1.7.3.2-1.1.el7 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
==================================================================================================================================================================================================================
Package Arch Version Repository > ==================================================================================================================================================================================================================
Installing:
socat x86_64 1.7.3.2-1.1.el7 /socat-1.7.3.2-1.1.el7.x86_64 1.4 M
Transaction Summary
==================================================================================================================================================================================================================
Install 1 Package
Total>
Installed> Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : socat-1.7.3.2-1.1.el7.x86_64 1/1
Verifying : socat-1.7.3.2-1.1.el7.x86_64 1/1
Installed:
socat.x86_64 0:1.7.3.2-1.1.el7
Complete!
Loaded plugins: fastestmirror, langpacks
Examining ../repo/kubectl-1.7.3-1.x86_64.rpm: kubectl-1.7.3-1.x86_64
Marking ../repo/kubectl-1.7.3-1.x86_64.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package kubectl.x86_64 0:1.7.3-1 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
==================================================================================================================================================================================================================
Package Arch Version Repository > ==================================================================================================================================================================================================================
Installing:
kubectl x86_64 1.7.3-1 /kubectl-1.7.3-1.x86_64 49 M
Transaction Summary
==================================================================================================================================================================================================================
Install 1 Package
Total>
Installed> Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : kubectl-1.7.3-1.x86_64 1/1
Verifying : kubectl-1.7.3-1.x86_64 1/1
Installed:
kubectl.x86_64 0:1.7.3-1
Complete!
Loaded plugins: fastestmirror, langpacks
Examining ../repo/kubelet-1.7.3-1.x86_64.rpm: kubelet-1.7.3-1.x86_64
Marking ../repo/kubelet-1.7.3-1.x86_64.rpm to be installed
Examining ../repo/kubernetes-cni-0.5.1-0.x86_64.rpm: kubernetes-cni-0.5.1-0.x86_64
Marking ../repo/kubernetes-cni-0.5.1-0.x86_64.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package kubelet.x86_64 0:1.7.3-1 will be installed
---> Package kubernetes-cni.x86_64 0:0.5.1-0 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
==================================================================================================================================================================================================================
Package Arch Version Repository > ==================================================================================================================================================================================================================
Installing:
kubelet x86_64 1.7.3-1 /kubelet-1.7.3-1.x86_64 96 M
kubernetes-cni x86_64 0.5.1-0 /kubernetes-cni-0.5.1-0.x86_64 28 M
Transaction Summary
==================================================================================================================================================================================================================
Install 2 Packages
Total>
Installed> Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : kubelet-1.7.3-1.x86_64 1/2
Installing : kubernetes-cni-0.5.1-0.x86_64 2/2
Verifying : kubernetes-cni-0.5.1-0.x86_64 1/2
Verifying : kubelet-1.7.3-1.x86_64 2/2
Installed:
kubelet.x86_64 0:1.7.3-1 kubernetes-cni.x86_64 0:0.5.1-0
Complete!
Loaded plugins: fastestmirror, langpacks
Examining ../repo/kubeadm-1.7.3-1.x86_64.rpm: kubeadm-1.7.3-1.x86_64
Marking ../repo/kubeadm-1.7.3-1.x86_64.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package kubeadm.x86_64 0:1.7.3-1 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
==================================================================================================================================================================================================================
Package Arch Version Repository > ==================================================================================================================================================================================================================
Installing:
kubeadm x86_64 1.7.3-1 /kubeadm-1.7.3-1.x86_64 49 M
Transaction Summary
==================================================================================================================================================================================================================
Install 1 Package
Total>
Installed> Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : kubeadm-1.7.3-1.x86_64 1/1
Verifying : kubeadm-1.7.3-1.x86_64 1/1
Installed:
kubeadm.x86_64 0:1.7.3-1
Complete!
Kubernetes v1.7.3
kubeadm version: |