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.

58 lines
2.0 KiB

  1. apiVersion: v1
  2. kind: Pod
  3. metadata:
  4. name: kube-apiserver
  5. namespace: kube-system
  6. spec:
  7. hostNetwork: true
  8. containers:
  9. - name: kube-apiserver
  10. image: {{ hyperkube_image_repo }}:{{ hyperkube_image_tag }}
  11. command:
  12. - /hyperkube
  13. - apiserver
  14. - --advertise-address={{ ip | default(ansible_default_ipv4.address) }}
  15. - --etcd-servers={{ etcd_access_endpoint }}
  16. - --insecure-bind-address={{ kube_apiserver_insecure_bind_address }}
  17. - --apiserver-count={{ kube_apiserver_count }}
  18. - --admission-control=NamespaceLifecycle,NamespaceExists,LimitRanger,SecurityContextDeny,ServiceAccount,ResourceQuota
  19. - --service-cluster-ip-range={{ kube_service_addresses }}
  20. - --client-ca-file={{ kube_cert_dir }}/ca.pem
  21. - --basic-auth-file={{ kube_users_dir }}/known_users.csv
  22. - --tls-cert-file={{ kube_cert_dir }}/apiserver.pem
  23. - --tls-private-key-file={{ kube_cert_dir }}/apiserver-key.pem
  24. - --token-auth-file={{ kube_token_dir }}/known_tokens.csv
  25. - --service-account-key-file={{ kube_cert_dir }}/apiserver-key.pem
  26. - --secure-port={{ kube_apiserver_port }}
  27. - --insecure-port={{ kube_apiserver_insecure_port }}
  28. {% if kube_api_runtime_config is defined %}
  29. {% for conf in kube_api_runtime_config %}
  30. - --runtime-config={{ conf }}
  31. {% endfor %}
  32. {% endif %}
  33. - --v={{ kube_log_level | default('2') }}
  34. - --allow-privileged=true
  35. {% if cloud_provider is defined and cloud_provider == "openstack" %}
  36. - --cloud-provider={{ cloud_provider }}
  37. - --cloud-config={{ kube_config_dir }}/cloud_config
  38. {% endif %}
  39. - 2>&1 >> {{ kube_log_dir }}/kube-apiserver.log
  40. volumeMounts:
  41. - mountPath: {{ kube_config_dir }}
  42. name: kubernetes-config
  43. readOnly: true
  44. - mountPath: /etc/ssl/certs
  45. name: ssl-certs-host
  46. readOnly: true
  47. - mountPath: /var/log/
  48. name: logfile
  49. volumes:
  50. - hostPath:
  51. path: {{ kube_config_dir }}
  52. name: kubernetes-config
  53. - hostPath:
  54. path: /etc/ssl/certs/
  55. name: ssl-certs-host
  56. - hostPath:
  57. path: /var/log/
  58. name: logfile