Skip to content

Commit

Permalink
添加kubelet根目录
Browse files Browse the repository at this point in the history
  • Loading branch information
lusyoe authored and gjmzj committed Aug 31, 2018
1 parent 36d1034 commit 2b4d92a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions roles/kube-node/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# 默认使用kube-proxy的 'iptables' 模式,可选 'ipvs' 模式(experimental)
PROXY_MODE: "iptables"

# Kubelet 根目录
KUBELET_ROOT_DIR: "/var/lib/kubelet"
1 change: 1 addition & 0 deletions roles/kube-node/templates/kubelet.service.j2
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ ExecStart={{ bin_dir }}/kubelet \
--fail-swap-on=false \
--anonymous-auth=false \
--logtostderr=true \
--root-dir={{ KUBELET_ROOT_DIR }} \
--v=2
#kubelet cAdvisor 默认在所有接口监听 4194 端口的请求, 以下iptables限制内网访问
ExecStartPost=/sbin/iptables -A INPUT -s 10.0.0.0/8 -p tcp --dport 4194 -j ACCEPT
Expand Down

0 comments on commit 2b4d92a

Please sign in to comment.