kubernetes安装部署-day05

六、部署CoreDNS

导入coredns镜像文件

[root@k8s-master1 k8s]# docker load -i coredns_1.1.3.tar.gz 
472b4fc7eba3: Loading layer [==================================================>]  4.221MB/4.221MB
68f610ae24f6: Loading layer [==================================================>]  1.024kB/1.024kB
f6ceaf474960: Loading layer [==================================================>]  9.335MB/9.335MB
2fe83798ee91: Loading layer [==================================================>]  32.66MB/32.66MB
8ece560a72c6: Loading layer [==================================================>]  1.024kB/1.024kB
225c880a51ac: Loading layer [==================================================>]  1.024kB/1.024kB
[root@k8s-master1 k8s]# 

上传镜像文件到自己的harbor服务器

[root@k8s-master1 k8s]# docker tag gcr.io/google-containers/coredns:1.1.3 k8s-harbor1.example.com/library/coredns:v1.1.3
You have new mail in /var/spool/mail/root
[root@k8s-master1 k8s]# docker images
REPOSITORY                                TAG                 IMAGE ID            CREATED             SIZE
k8s-harbor1.example.com/library/coredns   v1.1.3              b67af8a09489        12 months ago       45.6MB
gcr.io/google-containers/coredns          1.1.3               b67af8a09489        12 months ago       45.6MB
[root@k8s-master1 k8s]# docker push k8s-harbor1.example.com/library/coredns:v1.1.3
The push refers to repository [k8s-harbor1.example.com/library/coredns]
5f70bf18a086: Pushed 
53cb05deeb1b: Pushed 
b377cea4592b: Pushed 
5bef08742407: Pushed 
v1.1.3: digest: sha256:3be8907c54f31830e3974a03d7bea6450251bdac540f7b49b46f11deb967c7f0 size: 1568
[root@k8s-master1 k8s]# 

修改coredns.yaml

[root@k8s-master1 coredns]# pwd
/usr/local/src/kubernetes/cluster/addons/dns/coredns
编辑coredns.yaml配置文件
执行kubectl create -f coredns.yaml

安装busybox

[root@k8s-master1 k8s]# docker load -i busybox_latest.tar.gz 
511136ea3c5a: Loading layer [==================================================>]  1.024kB/1.024kB
df7546f9f060: Loading layer [==================================================>]  1.024kB/1.024kB
ea13149945cb: Loading layer [==================================================>]  2.644MB/2.644MB
4986bf8c1536: Loading layer [==================================================>]  1.024kB/1.024kB
[root@k8s-master1 k8s]# docker tag gcr.io/google-containers/busybox k8s-harbor1.example.com/library/busybox
[root@k8s-master1 k8s]# docker push k8s-harbor1.example.com/library/busybox
The push refers to repository [k8s-harbor1.example.com/library/busybox]
5f70bf18a086: Mounted from library/coredns 
7f02483a9752: Pushed 
latest: digest: sha256:126434cbcd961be7cca97506cb2878c3d10e476b97d8a2bb12cd0614646243df size: 1146
You have new mail in /var/spool/mail/root
[root@k8s-master1 k8s]# docker images
REPOSITORY                                                    TAG                 IMAGE ID            CREATED             SIZE
gcr.io/google-containers/coredns                              1.1.3               b67af8a09489        12 months ago       45.6MB
k8s-harbor1.example.com/library/coredns                       v1.1.3              b67af8a09489        12 months ago       45.6MB
k8s-harbor1.example.com/library/k8s-dns-sidecar-amd64         v1.14.5             fed89e8b4248        20 months ago       41.8MB
k8s-harbor1.example.com/library/k8s-dns-kube-dns-amd64        v1.14.5             512cd7425a73        20 months ago       49.4MB
k8s-harbor1.example.com/library/k8s-dns-dnsmasq-nanny-amd64   v1.14.5             459944ce8cc4        20 months ago       41.4MB
gcr.io/google-containers/busybox                              latest              3b974f620277        4 years ago         2.43MB
k8s-harbor1.example.com/library/busybox                       latest              3b974f620277        4 years ago         2.43MB
[root@k8s-master1 k8s]# kubectl create -f busybox.yaml 
pod/busybox created
验证coredns
[root@k8s-master1 ~]# kubectl exec busybox nslookup kube-dns.kube-system.svc.cluster.local
Server:    10.1.0.254
Address 1: 10.1.0.254 kube-dns.kube-system.svc.cluster.local

Name:      kube-dns.kube-system.svc.cluster.local
Address 1: 10.1.0.254 kube-dns.kube-system.svc.cluster.local

七、kube-dns安装部署

/root/k8s/kubedns

八、安装dashboard

[root@k8s-master1 dashboard]# docker load -i kubernetes-dashboard-amd64_v1.8.3.tar.gz 
3690474eb5b4: Loading layer [==================================================>]  1.024kB/1.024kB
7e8bbbed10e9: Loading layer [==================================================>]  102.8MB/102.8MB
d7d969d35832: Loading layer [==================================================>]  1.024kB/1.024kB
8e69c97ebaaa: Loading layer [==================================================>]  1.024kB/1.024kB
[root@k8s-master1 dashboard]# docker images
REPOSITORY                                                    TAG                 IMAGE ID            CREATED             SIZE
gcr.io/google-containers/coredns                              1.1.3               b67af8a09489        12 months ago       45.6MB
k8s-harbor1.example.com/library/coredns                       v1.1.3              b67af8a09489        12 months ago       45.6MB
gcr.io/google-containers/kubernetes-dashboard-amd64           v1.8.3              99fb56f8d819        15 months ago       102MB
k8s-harbor1.example.com/library/k8s-dns-sidecar-amd64         v1.14.5             fed89e8b4248        20 months ago       41.8MB
k8s-harbor1.example.com/library/k8s-dns-kube-dns-amd64        v1.14.5             512cd7425a73        20 months ago       49.4MB
k8s-harbor1.example.com/library/k8s-dns-dnsmasq-nanny-amd64   v1.14.5             459944ce8cc4        20 months ago       41.4MB
gcr.io/google-containers/busybox                              latest              3b974f620277        4 years ago         2.43MB
k8s-harbor1.example.com/library/busybox                       latest              3b974f620277        4 years ago         2.43MB
[root@k8s-master1 dashboard]# docker tag gcr.io/google-containers/kubernetes-dashboard-amd64:v1.8.3 k8s-harbor1.example.com/library/kubernetes-dashboard-amd64:v1.8.3You have new mail in /var/spool/mail/root
[root@k8s-master1 dashboard]# docker push k8s-harbor1.example.com/library/kubernetes-dashboard-amd64:v1.8.3
The push refers to repository [k8s-harbor1.example.com/library/kubernetes-dashboard-amd64]
5f70bf18a086: Mounted from library/busybox 
a8a12b33a109: Pushed 
v1.8.3: digest: sha256:e9cdb0fb025871a2fdab8b95e7e3a9546a0f3836fdbc58a43d173190de3d52f8 size: 1147
[root@k8s-master1 dashboard]# 
修改[root@k8s-master1 dashboard]# vim kubernetes-dashboard.yaml配置文件
image: k8s-harbor1.example.com/library/kubernetes-dashboard-amd64:v1.8.3
改成自己harbor下的镜像文件
[root@k8s-master1 dashboard]# kubectl create -f .
[root@k8s-master1 dashboard]# kubectl get pods --all-namespaces
NAMESPACE     NAME                                    READY     STATUS    RESTARTS   AGE
default       busybox                                 1/1       Running   3          3h
kube-system   kube-dns-65f747f6c8-4p7gn               3/3       Running   1          2d
kube-system   kubernetes-dashboard-7f4f96b579-5hxdw   1/1       Running   0          8m
[root@MSJTVL-CSK8S-A01 dashboard]# kubectl cluster-info
Kubernetes master is running at https://10.0.110.152:6443
KubeDNS is running at https://10.0.110.152:6443/api/v1/namespaces/kube-system/services/kube-dns:dns/proxy
kubernetes-dashboard is running at https://10.0.110.152:6443/api/v1/namespaces/kube-system/services/https:kubernetes-dashboard:/proxy

安装heapster图形界面

上传准备好的heapster.tar.gz包解压

[root@k8s-master1 heapster]# tar xvf heapster.tar.gz 
heapster/bal/
heapster/bal/heapster-influxdb-amd64-v1.1.1.tar
heapster/bal/heapster-amd64-v1.3.0.tar
heapster/grafana.yaml
heapster/heapster-amd64_v1.5.1.tar
heapster/heapster-grafana-amd64-v4.4.3.tar
heapster/heapster-influxdb-amd64_v1.3.3.tar
heapster/heapster.yaml
heapster/influxdb.yaml
heapster/influxdb.yaml.bak
You have new mail in /var/spool/mail/root
[root@k8s-master1 heapster]# ll
total 96356
drwxr-xr-x 3 root root     4096 Jun  3 15:39 heapster
-rw-r--r-- 1 root root 98662589 Jun  3 11:27 heapster.tar.gz
[root@k8s-master1 heapster]# cd heapster
[root@k8s-master1 heapster]# ll
total 237196
drwxr-xr-x 2 root root      4096 Mar 20  2018 bal
-rw-r--r-- 1 root root      2236 Jul 20  2018 grafana.yaml
-rw-r--r-- 1 root root  75343360 Mar 20  2018 heapster-amd64_v1.5.1.tar
-rw-r--r-- 1 root root 154731520 Dec 15  2017 heapster-grafana-amd64-v4.4.3.tar
-rw-r--r-- 1 root root  12782080 Mar 20  2018 heapster-influxdb-amd64_v1.3.3.tar
-rw-r--r-- 1 root root      1457 Jul 20  2018 heapster.yaml
-rw-r--r-- 1 root root       985 Jul 20  2018 influxdb.yaml
-rw-r--r-- 1 root root      4500 Mar 20  2018 influxdb.yaml.bak

把heapster相关的包导入到harbor中
heapster负责接收数据、grafana负责展示、influxdb负责存储数据

[root@k8s-master1 heapster]# docker load -i heapster-amd64_v1.5.1.tar 
3de7e8578f12: Loading layer [==================================================>]  75.04MB/75.04MB
2dbb7196db9c: Loading layer [==================================================>]  281.1kB/281.1kB
f950b533fc04: Loading layer [==================================================>]  1.024kB/1.024kB
8be2cab0b43d: Loading layer [==================================================>]  1.024kB/1.024kB
You have new mail in /var/spool/mail/root
[root@k8s-master1 heapster]# dcoerk images
-bash: dcoerk: command not found
[root@k8s-master1 heapster]# docker images
REPOSITORY                                                    TAG                 IMAGE ID            CREATED             SIZE
gcr.io/google-containers/coredns                              1.1.3               b67af8a09489        12 months ago       45.6MB
k8s-harbor1.example.com/library/coredns                       v1.1.3              b67af8a09489        12 months ago       45.6MB
gcr.io/google-containers/kubernetes-dashboard-amd64           v1.8.3              99fb56f8d819        15 months ago       102MB
k8s-harbor1.example.com/library/kubernetes-dashboard-amd64    v1.8.3              99fb56f8d819        15 months ago       102MB
gcr.io/google-containers/heapster-amd64                       v1.5.1              4129aa919411        15 months ago       75.3MB
k8s-harbor1.example.com/library/k8s-dns-sidecar-amd64         v1.14.5             fed89e8b4248        20 months ago       41.8MB
k8s-harbor1.example.com/library/k8s-dns-kube-dns-amd64        v1.14.5             512cd7425a73        20 months ago       49.4MB
k8s-harbor1.example.com/library/k8s-dns-dnsmasq-nanny-amd64   v1.14.5             459944ce8cc4        20 months ago       41.4MB
gcr.io/google-containers/busybox                              latest              3b974f620277        4 years ago         2.43MB
k8s-harbor1.example.com/library/busybox                       latest              3b974f620277        4 years ago         2.43MB
[root@k8s-master1 heapster]# docker tag gcr.io/google-containers/heapster-amd64:v1.5.1 k8s-harbor1.example.com/library/heapster-amd64:v1.5.1
[root@k8s-master1 heapster]# docker push k8s-harbor1.example.com/library/heapster-amd64:v1.5.1
The push refers to repository [k8s-harbor1.example.com/library/heapster-amd64]
5f70bf18a086: Mounted from library/kubernetes-dashboard-amd64 
7537be4696e7: Pushed 
67502f14960c: Pushed 
v1.5.1: digest: sha256:2c9bb2281e582ba6558766de5d2a4beef9247e01418de9a09fe5a96b9192f766 size: 1151
You have new mail in /var/spool/mail/root
[root@k8s-master1 heapster]# docker load -i heapster-grafana-amd64-v4.4.3.tar
6a749002dd6a: Loading layer [==================================================>]  1.338MB/1.338MB
c6824ad4ffdf: Loading layer [==================================================>]  147.5MB/147.5MB
bfabb39c3978: Loading layer [==================================================>]  230.4kB/230.4kB
b22f6c47113d: Loading layer [==================================================>]   2.56kB/2.56kB
60ae3052f093: Loading layer [==================================================>]  5.606MB/5.606MB
Loaded image ID: sha256:8cb3de219af7bdf0b3ae66439aecccf94cebabb230171fa4b24d66d4a786f4f7
[root@k8s-master1 heapster]# docker images
REPOSITORY                                                    TAG                 IMAGE ID            CREATED             SIZE
gcr.io/google-containers/coredns                              1.1.3               b67af8a09489        12 months ago       45.6MB
k8s-harbor1.example.com/library/coredns                       v1.1.3              b67af8a09489        12 months ago       45.6MB
gcr.io/google-containers/kubernetes-dashboard-amd64           v1.8.3              99fb56f8d819        15 months ago       102MB
k8s-harbor1.example.com/library/kubernetes-dashboard-amd64    v1.8.3              99fb56f8d819        15 months ago       102MB
gcr.io/google-containers/heapster-amd64                       v1.5.1              4129aa919411        15 months ago       75.3MB
k8s-harbor1.example.com/library/heapster-amd64                v1.5.1              4129aa919411        15 months ago       75.3MB
k8s-harbor1.example.com/library/k8s-dns-sidecar-amd64         v1.14.5             fed89e8b4248        20 months ago       41.8MB
k8s-harbor1.example.com/library/k8s-dns-kube-dns-amd64        v1.14.5             512cd7425a73        20 months ago       49.4MB
k8s-harbor1.example.com/library/k8s-dns-dnsmasq-nanny-amd64   v1.14.5             459944ce8cc4        20 months ago       41.4MB
                                                                      8cb3de219af7        21 months ago       152MB
gcr.io/google-containers/busybox                              latest              3b974f620277        4 years ago         2.43MB
k8s-harbor1.example.com/library/busybox                       latest              3b974f620277        4 years ago         2.43MB
[root@k8s-master1 heapster]# docker tag 8cb3de219af7 k8s-harbor1.example.com/library/heapster-grafana-amd64:v4.4.3
You have new mail in /var/spool/mail/root
[root@k8s-master1 heapster]# docker push k8s-harbor1.example.com/library/heapster-grafana-amd64:v4.4.3
The push refers to repository [k8s-harbor1.example.com/library/heapster-grafana-amd64]
60ae3052f093: Pushed 
b22f6c47113d: Pushed 
bfabb39c3978: Pushed 
c6824ad4ffdf: Pushed 
6a749002dd6a: Pushed 
v4.4.3: digest: sha256:0c65bf80f0f0af83b6e7384dc42a467fbb7bc78f73b88cfc78e44ea894bc84a2 size: 1365
[root@k8s-master1 heapster]# docker images
REPOSITORY                                                    TAG                 IMAGE ID            CREATED             SIZE
gcr.io/google-containers/coredns                              1.1.3               b67af8a09489        12 months ago       45.6MB
k8s-harbor1.example.com/library/coredns                       v1.1.3              b67af8a09489        12 months ago       45.6MB
gcr.io/google-containers/kubernetes-dashboard-amd64           v1.8.3              99fb56f8d819        15 months ago       102MB
k8s-harbor1.example.com/library/kubernetes-dashboard-amd64    v1.8.3              99fb56f8d819        15 months ago       102MB
gcr.io/google-containers/heapster-amd64                       v1.5.1              4129aa919411        15 months ago       75.3MB
k8s-harbor1.example.com/library/heapster-amd64                v1.5.1              4129aa919411        15 months ago       75.3MB
k8s-harbor1.example.com/library/k8s-dns-sidecar-amd64         v1.14.5             fed89e8b4248        20 months ago       41.8MB
k8s-harbor1.example.com/library/k8s-dns-kube-dns-amd64        v1.14.5             512cd7425a73        20 months ago       49.4MB
k8s-harbor1.example.com/library/k8s-dns-dnsmasq-nanny-amd64   v1.14.5             459944ce8cc4        20 months ago       41.4MB
k8s-harbor1.example.com/library/heapster-grafana-amd64        v4.4.3              8cb3de219af7        21 months ago       152MB
gcr.io/google-containers/busybox                              latest              3b974f620277        4 years ago         2.43MB
k8s-harbor1.example.com/library/busybox                       latest              3b974f620277        4 years ago         2.43MB
You have new mail in /var/spool/mail/root
[root@k8s-master1 heapster]# ll
total 237204
drwxr-xr-x 2 root root      4096 Mar 20  2018 bal
-rw-r--r-- 1 root root      2236 Jul 20  2018 grafana.yaml
-rw-r--r-- 1 root root  75343360 Mar 20  2018 heapster-amd64_v1.5.1.tar
-rw-r--r-- 1 root root 154731520 Dec 15  2017 heapster-grafana-amd64-v4.4.3.tar
-rw-r--r-- 1 root root  12782080 Mar 20  2018 heapster-influxdb-amd64_v1.3.3.tar
-rw-r--r-- 1 root root      1457 Jul 20  2018 heapster.yaml
-rw-r--r-- 1 root root       985 Jul 20  2018 influxdb.yaml
-rw-r--r-- 1 root root      4500 Mar 20  2018 influxdb.yaml.bak
[root@k8s-master1 heapster]# docker load -i heapster-influxdb-amd64_v1.3.3.tar
c095ebc1f703: Loading layer [==================================================>]  1.338MB/1.338MB
0e95ea317da4: Loading layer [==================================================>]  1.024kB/1.024kB
93fd8472a0af: Loading layer [==================================================>]  11.42MB/11.42MB
ded580a95e92: Loading layer [==================================================>]  4.608kB/4.608kB
523fc6fbaebb: Loading layer [==================================================>]  1.024kB/1.024kB
[root@k8s-master1 heapster]# ll
total 237204
drwxr-xr-x 2 root root      4096 Mar 20  2018 bal
-rw-r--r-- 1 root root      2236 Jul 20  2018 grafana.yaml
-rw-r--r-- 1 root root  75343360 Mar 20  2018 heapster-amd64_v1.5.1.tar
-rw-r--r-- 1 root root 154731520 Dec 15  2017 heapster-grafana-amd64-v4.4.3.tar
-rw-r--r-- 1 root root  12782080 Mar 20  2018 heapster-influxdb-amd64_v1.3.3.tar
-rw-r--r-- 1 root root      1457 Jul 20  2018 heapster.yaml
-rw-r--r-- 1 root root       985 Jul 20  2018 influxdb.yaml
-rw-r--r-- 1 root root      4500 Mar 20  2018 influxdb.yaml.bak
[root@k8s-master1 heapster]# docker images
REPOSITORY                                                    TAG                 IMAGE ID            CREATED             SIZE
gcr.io/google-containers/coredns                              1.1.3               b67af8a09489        12 months ago       45.6MB
k8s-harbor1.example.com/library/coredns                       v1.1.3              b67af8a09489        12 months ago       45.6MB
gcr.io/google-containers/kubernetes-dashboard-amd64           v1.8.3              99fb56f8d819        15 months ago       102MB
k8s-harbor1.example.com/library/kubernetes-dashboard-amd64    v1.8.3              99fb56f8d819        15 months ago       102MB
gcr.io/google-containers/heapster-amd64                       v1.5.1              4129aa919411        15 months ago       75.3MB
k8s-harbor1.example.com/library/heapster-amd64                v1.5.1              4129aa919411        15 months ago       75.3MB
k8s-harbor1.example.com/library/k8s-dns-sidecar-amd64         v1.14.5             fed89e8b4248        20 months ago       41.8MB
k8s-harbor1.example.com/library/k8s-dns-kube-dns-amd64        v1.14.5             512cd7425a73        20 months ago       49.4MB
k8s-harbor1.example.com/library/k8s-dns-dnsmasq-nanny-amd64   v1.14.5             459944ce8cc4        20 months ago       41.4MB
gcr.io/google-containers/heapster-influxdb-amd64              v1.3.3              1315f002663c        21 months ago       12.5MB
k8s-harbor1.example.com/library/heapster-grafana-amd64        v4.4.3              8cb3de219af7        21 months ago       152MB
gcr.io/google-containers/busybox                              latest              3b974f620277        4 years ago         2.43MB
k8s-harbor1.example.com/library/busybox                       latest              3b974f620277        4 years ago         2.43MB
[root@k8s-master1 heapster]# docker tag gcr.io/google-containers/heapster-influxdb-amd64:v1.3.4 k8s-harbor1.example.com/library/heapster-influxdb-amd64:v1.3.4
Error response from daemon: No such image: gcr.io/google-containers/heapster-influxdb-amd64:v1.3.4
[root@k8s-master1 heapster]# docker tag gcr.io/google-containers/heapster-influxdb-amd64:v1.3.3 k8s-harbor1.example.com/library/heapster-influxdb-amd64:v1.3.3
[root@k8s-master1 heapster]# docekr push k8s-harbor1.example.com/library/heapster-influxdb-amd64:v1.3.3
-bash: docekr: command not found
[root@k8s-master1 heapster]# docker push k8s-harbor1.example.com/library/heapster-influxdb-amd64:v1.3.3
The push refers to repository [k8s-harbor1.example.com/library/heapster-influxdb-amd64]
5f70bf18a086: Mounted from library/heapster-amd64 
1f125f5c227b: Pushed 
6654b5b85f67: Pushed 
6a749002dd6a: Mounted from library/heapster-grafana-amd64 
v1.3.3: digest: sha256:5fd1da86c93734f58132b75222d85a4d90c8946ea0c851b90322c0a5d7ea7475 size: 1357
[root@k8s-master1 heapster]# docker images
REPOSITORY                                                    TAG                 IMAGE ID            CREATED             SIZE
gcr.io/google-containers/coredns                              1.1.3               b67af8a09489        12 months ago       45.6MB
k8s-harbor1.example.com/library/coredns                       v1.1.3              b67af8a09489        12 months ago       45.6MB
gcr.io/google-containers/kubernetes-dashboard-amd64           v1.8.3              99fb56f8d819        15 months ago       102MB
k8s-harbor1.example.com/library/kubernetes-dashboard-amd64    v1.8.3              99fb56f8d819        15 months ago       102MB
gcr.io/google-containers/heapster-amd64                       v1.5.1              4129aa919411        15 months ago       75.3MB
k8s-harbor1.example.com/library/heapster-amd64                v1.5.1              4129aa919411        15 months ago       75.3MB
k8s-harbor1.example.com/library/k8s-dns-sidecar-amd64         v1.14.5             fed89e8b4248        20 months ago       41.8MB
k8s-harbor1.example.com/library/k8s-dns-kube-dns-amd64        v1.14.5             512cd7425a73        20 months ago       49.4MB
k8s-harbor1.example.com/library/k8s-dns-dnsmasq-nanny-amd64   v1.14.5             459944ce8cc4        20 months ago       41.4MB
gcr.io/google-containers/heapster-influxdb-amd64              v1.3.3              1315f002663c        21 months ago       12.5MB
k8s-harbor1.example.com/library/heapster-influxdb-amd64       v1.3.3              1315f002663c        21 months ago       12.5MB
k8s-harbor1.example.com/library/heapster-grafana-amd64        v4.4.3              8cb3de219af7        21 months ago       152MB
gcr.io/google-containers/busybox                              latest              3b974f620277        4 years ago         2.43MB
k8s-harbor1.example.com/library/busybox                       latest              3b974f620277        4 years ago         2.43MB
[root@k8s-master1 heapster]# ll
total 237204
drwxr-xr-x 2 root root      4096 Mar 20  2018 bal
-rw-r--r-- 1 root root      2236 Jul 20  2018 grafana.yaml
-rw-r--r-- 1 root root  75343360 Mar 20  2018 heapster-amd64_v1.5.1.tar
-rw-r--r-- 1 root root 154731520 Dec 15  2017 heapster-grafana-amd64-v4.4.3.tar
-rw-r--r-- 1 root root  12782080 Mar 20  2018 heapster-influxdb-amd64_v1.3.3.tar
-rw-r--r-- 1 root root      1457 Jul 20  2018 heapster.yaml
-rw-r--r-- 1 root root       985 Jul 20  2018 influxdb.yaml
-rw-r--r-- 1 root root      4500 Mar 20  2018 influxdb.yaml.bak
You have new mail in /var/spool/mail/root
[root@k8s-master1 heapster]# vim heapster.yaml 
[root@k8s-master1 heapster]# vim grafana.yaml 
You have new mail in /var/spool/mail/root
[root@k8s-master1 heapster]# vim influxdb.yaml
[root@k8s-master1 heapster]# kubectl create -f .
deployment.extensions/monitoring-grafana created
service/monitoring-grafana created
serviceaccount/heapster created
clusterrolebinding.rbac.authorization.k8s.io/heapster created
deployment.extensions/heapster created
service/heapster created
deployment.extensions/monitoring-influxdb created
service/monitoring-influxdb created
[root@k8s-master1 heapster]# kubectl get pods --all-namespaces
NAMESPACE     NAME                                    READY     STATUS              RESTARTS   AGE
default       busybox                                 1/1       Running             6          6h
kube-system   heapster-587f6c9b46-hwljv               0/1       ContainerCreating   0          16s
kube-system   kube-dns-65f747f6c8-4p7gn               3/3       Running             1          2d
kube-system   kubernetes-dashboard-7f4f96b579-5hxdw   1/1       Running             0          2h
kube-system   kubernetes-dashboard-7f4f96b579-glqnh   1/1       Running             0          2h
kube-system   monitoring-grafana-5dc657db9f-cqxjq     0/1       ContainerCreating   0          16s
kube-system   monitoring-influxdb-789d98f4cb-ktsl7    0/1       ContainerCreating   0          16s
[root@k8s-master1 heapster]# kubectl get pods --all-namespaces
NAMESPACE     NAME                                    READY     STATUS    RESTARTS   AGE
default       busybox                                 1/1       Running   6          6h
kube-system   heapster-587f6c9b46-hwljv               1/1       Running   0          23s
kube-system   kube-dns-65f747f6c8-4p7gn               3/3       Running   1          2d
kube-system   kubernetes-dashboard-7f4f96b579-5hxdw   1/1       Running   0          2h
kube-system   kubernetes-dashboard-7f4f96b579-glqnh   1/1       Running   0          2h
kube-system   monitoring-grafana-5dc657db9f-cqxjq     1/1       Running   0          23s
kube-system   monitoring-influxdb-789d98f4cb-ktsl7    1/1       Running   0          23s

你可能感兴趣的:(kubernetes安装部署-day05)