You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

47 lines
1.6 KiB

  1. apiVersion: v1
  2. kind: Pod
  3. metadata:
  4. name: kube-proxy
  5. namespace: kube-system
  6. spec:
  7. hostNetwork: true
  8. containers:
  9. - name: kube-proxy
  10. image: {{ hyperkube_image_repo }}:{{ hyperkube_image_tag }}
  11. command:
  12. - /hyperkube
  13. - proxy
  14. - --v={{ kube_log_level | default('2') }}
  15. {% if inventory_hostname in groups['kube-master'] %}
  16. - --master=http://127.0.0.1:{{kube_apiserver_insecure_port}}
  17. {% else %}
  18. {% if loadbalancer_apiserver is defined and apiserver_loadbalancer_domain_name is defined %}
  19. - --master=https://{{ apiserver_loadbalancer_domain_name }}:{{ loadbalancer_apiserver.port }}
  20. {% else %}
  21. - --master=https://{{ hostvars[groups['kube-master'][0]]['access_ip'] | default(hostvars[groups['kube-master'][0]]['ip'] | default(hostvars[groups['kube-master'][0]]['ansible_default_ipv4']['address'])) }}:{{ kube_apiserver_port }}
  22. {% endif%}
  23. - --kubeconfig=/etc/kubernetes/node-kubeconfig.yaml
  24. {% endif %}
  25. - --bind-address={{ ip | default(ansible_default_ipv4.address) }}
  26. securityContext:
  27. privileged: true
  28. volumeMounts:
  29. - mountPath: /etc/ssl/certs
  30. name: ssl-certs-host
  31. readOnly: true
  32. - mountPath: /etc/kubernetes/node-kubeconfig.yaml
  33. name: "kubeconfig"
  34. readOnly: true
  35. - mountPath: /etc/kubernetes/ssl
  36. name: "etc-kube-ssl"
  37. readOnly: true
  38. volumes:
  39. - name: ssl-certs-host
  40. hostPath:
  41. path: /usr/share/ca-certificates
  42. - name: "kubeconfig"
  43. hostPath:
  44. path: "/etc/kubernetes/node-kubeconfig.yaml"
  45. - name: "etc-kube-ssl"
  46. hostPath:
  47. path: "/etc/kubernetes/ssl"