在Centos 7 上 搭建 K8S --坑b)

过去一段时间,公司事情比较多,现在稍微能好点,今天进一步验证自己K8S 集群环境,遇到不少问题, 发现从自己的master 上无法访问node 的pod, 然后一堆search 。 config 。。

突然发现自己的master 不能用了, 晕。。。。。。。


[root@k8s-master ~]# systemctl status  kubelet
● kubelet.service - kubelet: The Kubernetes Node Agent
   Loaded: loaded (/etc/systemd/system/kubelet.service; enabled; vendor preset: disabled)
  Drop-In: /etc/systemd/system/kubelet.service.d
           └─10-kubeadm.conf, 90-local-extras.conf
   Active: activating (auto-restart) (Result: exit-code) since Wed 2017-11-29 02:21:38 EST; 8s ago
     Docs: http://kubernetes.io/docs/
  Process: 6741 ExecStart=/usr/bin/kubelet $KUBELET_KUBECONFIG_ARGS $KUBELET_SYSTEM_PODS_ARGS $KUBELET_NETWORK_ARGS $KUBELET_DNS_ARGS $KUBELET_AUTHZ_ARGS $KUBELET_CADVISOR_ARGS $KUBELET_CGROUP_ARGS $KUBELET_CERTIFICATE_ARGS $KUBELET_EXTRA_ARGS (code=exited, status=1/FAILURE)
 Main PID: 6741 (code=exited, status=1/FAILURE)

Nov 29 02:21:38 k8s-master systemd[1]: kubelet.service: main process exited, code=exited, status=1/FAILURE
Nov 29 02:21:38 k8s-master systemd[1]: Unit kubelet.service entered failed state.
Nov 29 02:21:38 k8s-master systemd[1]: kubelet.service failed.

寄希望重启可以解决问题,可是。。。。。

[root@k8s-master ~]# setenforce 0
setenforce: SELinux is disabled
[root@k8s-master ~]# docker info
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
[root@k8s-master ~]# systemctl start docker
Job for docker.service failed because the control process exited with error code. See "systemctl status docker.service" and "journalctl -xe" for details.
[root@k8s-master ~]# vi /etc/docker/daemon.json
[root@k8s-master ~]# systemctl start docker
Job for docker.service failed because start of the service was attempted too often. See "systemctl status docker.service" and "journalctl -xe" for details.
To force a start use "systemctl reset-failed docker.service" followed by "systemctl start docker.service" again.

真是一波未平,一波又起, 身心俱疲, 如果之前把文档做好何苦这样盲目跟从,哎。。。。。接着看 上面红色标记的error, yea。。。

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

[root@k8s-master ~]# systemctl reset-failed docker.service
[root@k8s-master ~]# docker info
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
[root@k8s-master ~]# systemctl start docker.service
[root@k8s-master ~]# docker info
Containers: 16
 Running: 0
 Paused: 0
 Stopped: 16
Images: 13
Server Version: 17.09.0-ce
Storage Driver: overlay
 Backing Filesystem: xfs
 Supports d_type: false
Logging Driver: json-file
Cgroup Driver: systemd
Plugins:
 Volume: local
 Network: bridge host macvlan null overlay
 Log: awslogs fluentd gcplogs gelf journald json-file logentries splunk syslog
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 06b9cb35161009dcb7123345749fef02f7cea8e0
runc version: 3f2f8b84a77f73d38244dd690525642a72156c64
init version: 949e6fa
Security Options:
 seccomp
  Profile: default
Kernel Version: 3.10.0-327.el7.x86_64
Operating System: CentOS Linux 7 (Core)
OSType: linux
Architecture: x86_64
CPUs: 1
Total Memory: 3.451GiB
Name: k8s-master
ID: AMF2:74IM:QNMK:ZXTH:AAQX:IKL6:J4WU:MSNL:M2N3:SH7U:DDLG:CU3M
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Http Proxy: http://9.21.50.139:3128/
Https Proxy: https://9.21.50.139:3128/
Username: ibmlei
Registry: https://index.docker.io/v1/
Experimental: false
Insecure Registries:
 127.0.0.0/8
Live Restore Enabled: false

WARNING: overlay: the backing xfs filesystem is formatted without d_type support, which leads to incorrect behavior.
         Reformat the filesystem with ftype=1 to enable d_type support.
         Running without d_type support will not be supported in future releases.
[root@k8s-master ~]# systemctl start kubelet

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

完美,docker 总算起来了哈哈。 继续。。。

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

[root@k8s-master ~]# kubectl get no




Unable to connect to the server: unexpected EOF

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

什么情况,之前的cluster 挂了 ?!!!! My GOD..... 苍天啊, 别开玩笑。。。。

++++++++++++++++&#

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 4
    评论
评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值