设置kube-proxy参数--masquerade-all=false

pull/275/head
jmgao 2017-12-05 21:31:28 +08:00
parent 4adf581ac2
commit 9048ef00ba
3 changed files with 10 additions and 18 deletions

View File

@ -1,3 +1,4 @@
{ {
"registry-mirrors": ["https://registry.docker-cn.com"] "registry-mirrors": ["https://registry.docker-cn.com"],
"max-concurrent-downloads": 6
} }

View File

@ -42,14 +42,8 @@
- name: 创建kubelet的systemd unit文件 - name: 创建kubelet的systemd unit文件
template: src=kubelet.service.j2 dest=/etc/systemd/system/kubelet.service template: src=kubelet.service.j2 dest=/etc/systemd/system/kubelet.service
- name: daemon-reload - name: 开启kubelet 服务
shell: systemctl daemon-reload shell: systemctl daemon-reload && systemctl enable kubelet && systemctl restart kubelet
- name: enable-kubelet
shell: systemctl enable kubelet
- name: start-kubelet
shell: systemctl restart kubelet
- name: approve-kubelet-csr - name: approve-kubelet-csr
shell: "sleep 15 && {{ bin_dir }}/kubectl get csr|grep 'Pending' | awk 'NR>0{print $1}'| xargs {{ bin_dir }}/kubectl certificate approve" shell: "sleep 15 && {{ bin_dir }}/kubectl get csr|grep 'Pending' | awk 'NR>0{print $1}'| xargs {{ bin_dir }}/kubectl certificate approve"
@ -94,17 +88,13 @@
- name: 创建kube-proxy的工作目录 - name: 创建kube-proxy的工作目录
file: name=/var/lib/kube-proxy state=directory file: name=/var/lib/kube-proxy state=directory
- name: 创建kube-proxy的systemd unit文件 - name: 创建kube-proxy 服务文件
tags: reload-kube-proxy
template: src=kube-proxy.service.j2 dest=/etc/systemd/system/kube-proxy.service template: src=kube-proxy.service.j2 dest=/etc/systemd/system/kube-proxy.service
- name: daemon-reload - name: 开启kube-proxy 服务
shell: systemctl daemon-reload tags: reload-kube-proxy
shell: systemctl daemon-reload && systemctl enable kube-proxy && systemctl restart kube-proxy
- name: enable-kube-proxy
shell: systemctl enable kube-proxy
- name: start-kube-proxy
shell: systemctl restart kube-proxy
##-------calico-kube-controllers部分---------------- ##-------calico-kube-controllers部分----------------
# #

View File

@ -10,6 +10,7 @@ ExecStart={{ bin_dir }}/kube-proxy \
--hostname-override={{ NODE_IP }} \ --hostname-override={{ NODE_IP }} \
--cluster-cidr={{ SERVICE_CIDR }} \ --cluster-cidr={{ SERVICE_CIDR }} \
--kubeconfig=/etc/kubernetes/kube-proxy.kubeconfig \ --kubeconfig=/etc/kubernetes/kube-proxy.kubeconfig \
--masquerade-all=false \
--logtostderr=true \ --logtostderr=true \
--v=2 --v=2
Restart=on-failure Restart=on-failure