码迷,mamicode.com
首页 > 其他好文 > 详细

[k8s]kubelet最佳实战

时间:2017-11-22 17:52:06      阅读:733      评论:0      收藏:0      [点我收藏+]

标签:amd   实战   目录   over   状态   std   als   inf   2.4   

简单的启动kubelet

kubelet     --api-servers=http://192.168.14.132:8080

完善的启动kubelet

kubelet     --api-servers=http://192.168.14.132:8080     --pod-infra-container-image=kubeguide/pause-amd64:3.0     --allow-privileged=true     --kubelethostname-override=192.168.14.133     --logtostderr=false     --log-dir=/root/logs/     --v=2

查看node状态

参考:
https://k8smeetup.github.io/docs/concepts/architecture/nodes/

kubectl describe node

查看cadvisor(kubelet自带)

http://192.168.14.133:4194

状态观察

参考:
https://k8smeetup.github.io/docs/concepts/architecture/nodes/

  • 50s容器由exit状态到删掉
kubectl delete -f busybox.yaml  #50s容器由exit状态到删掉
  • 5min节点好像由不可用到删除
kube-controller-manager一个参数:根据节点状态删除.
# The grace period for deleting pods on failed nodes. (default 5m0s)5分钟
--pod-eviction-timeout duration

Ready 条件处于状态 “Unknown” 或者 “False” 的时间超过了 pod-eviction-timeout(一个传递给 kube-controller-manager 的参数),node 上的所有 Pods 都会被 Node 控制器计划删除。默认的删除超时时长为5分钟。

kubelet报错但是没解决的-据说是1.7版本的bug.我是1.7.10

W1122 15:49:22.233484   71196 helpers.go:793] eviction manager: no observation found for eviction signal allocatableNodeFs.available
W1122 15:49:32.301474   71196 helpers.go:793] eviction manager: no observation found for eviction signal allocatableNodeFs.available
W1122 15:49:42.355303   71196 helpers.go:793] eviction manager: no observation found for eviction signal allocatableNodeFs.available
W1122 15:49:52.402125   71196 helpers.go:793] eviction manager: no observation found for eviction signal allocatableNodeFs.available

etcd报出问题--这个是etcd版本问题,不影响使用,我是yum install etcd搞的

[root@m1 yaml]# E1122 16:19:49.499797   57214 watcher.go:210] watch chan error: etcdserver: mvcc: required revision has been compacted
E1122 16:21:15.609115   57214 watcher.go:210] watch chan error: etcdserver: mvcc: required revision has been compacted

kubelet启动后会自动创建它的工作目录/var/lib/kubelet/

[root@n1 kubernetes]# tree /var/lib/kubelet/
/var/lib/kubelet/
├── plugins
└── pods
    ├── f56d5553-cf58-11e7-adbb-000c29154f03
    │?? ├── containers
    │?? │?? └── busybox
    │?? │??     └── 24bd58a0
    │?? ├── etc-hosts
    │?? ├── plugins
    │?? └── volumes
    ├── fffefc20-cf58-11e7-adbb-000c29154f03
    │?? ├── containers
    │?? │?? └── nginx
    │?? │??     └── 221a8328
    │?? ├── etc-hosts
    │?? ├── plugins
    │?? └── volumes
    ├── ffff1611-cf58-11e7-adbb-000c29154f03
    │?? ├── containers
    │?? │?? └── nginx
    │?? │??     └── d2d2f44d
    │?? ├── etc-hosts
    │?? ├── plugins
    │?? └── volumes
    └── ffff1ff8-cf58-11e7-adbb-000c29154f03
        ├── containers
        │?? └── nginx
        │??     └── bd101c6e
        ├── etc-hosts
        ├── plugins
        └── volumes

[k8s]kubelet最佳实战

标签:amd   实战   目录   over   状态   std   als   inf   2.4   

原文地址:http://www.cnblogs.com/iiiiher/p/7879587.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!