kube-apiserver.manifest 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  1. {
  2. "apiVersion": "v1",
  3. "kind": "Pod",
  4. "metadata": {
  5. "name":"kube-apiserver",
  6. "namespace": "kube-system",
  7. "annotations": {
  8. "scheduler.alpha.kubernetes.io/critical-pod": "",
  9. "seccomp.security.alpha.kubernetes.io/pod": "docker/default"
  10. },
  11. "labels": {
  12. "tier": "control-plane",
  13. "component": "kube-apiserver"
  14. }
  15. },
  16. "spec":{
  17. "hostNetwork": true,
  18. "containers":[
  19. {
  20. "name": "kube-apiserver",
  21. "image": "{{pillar['kube_docker_registry']}}/kube-apiserver:{{pillar['kube-apiserver_docker_tag']}}",
  22. "resources": {
  23. "requests": {
  24. "cpu": "250m"
  25. }
  26. },
  27. "command": [
  28. "/bin/sh",
  29. "-c",
  30. "exec /usr/local/bin/kube-apiserver {{params}} --allow-privileged={{pillar['allow_privileged']}} 1>>/var/log/kube-apiserver.log 2>&1"
  31. ],
  32. {{container_env}}
  33. "livenessProbe": {
  34. "httpGet": {
  35. "scheme": "HTTPS",
  36. "host": "127.0.0.1",
  37. "port": {{secure_port}},
  38. "path": "/healthz?exclude=etcd"
  39. },
  40. "initialDelaySeconds": {{liveness_probe_initial_delay}},
  41. "timeoutSeconds": 15
  42. },
  43. "readinessProbe": {
  44. "httpGet": {
  45. "scheme": "HTTPS",
  46. "host": "127.0.0.1",
  47. "port": {{secure_port}},
  48. "path": "/healthz"
  49. },
  50. "periodSeconds": 1,
  51. "timeoutSeconds": 15
  52. },
  53. "ports":[
  54. {{insecure_port_mapping}}
  55. { "name": "https",
  56. "containerPort": {{secure_port}},
  57. "hostPort": {{secure_port}}}
  58. ],
  59. "volumeMounts": [
  60. {{kms_socket_mount}}
  61. {{encryption_provider_mount}}
  62. {{cloud_config_mount}}
  63. {{additional_cloud_config_mount}}
  64. {{webhook_config_mount}}
  65. {{webhook_authn_config_mount}}
  66. {{audit_policy_config_mount}}
  67. {{audit_webhook_config_mount}}
  68. {{admission_controller_config_mount}}
  69. {{image_policy_webhook_config_mount}}
  70. { "name": "srvkube",
  71. "mountPath": "/etc/srv/kubernetes",
  72. "readOnly": true},
  73. { "name": "logfile",
  74. "mountPath": "/var/log/kube-apiserver.log",
  75. "readOnly": false},
  76. { "name": "auditlogfile",
  77. "mountPath": "/var/log/kube-apiserver-audit.log",
  78. "readOnly": false},
  79. { "name": "etcssl",
  80. "mountPath": "/etc/ssl",
  81. "readOnly": true},
  82. { "name": "usrsharecacerts",
  83. "mountPath": "/usr/share/ca-certificates",
  84. "readOnly": true},
  85. { "name": "varssl",
  86. "mountPath": "/var/ssl",
  87. "readOnly": true},
  88. { "name": "etcopenssl",
  89. "mountPath": "/etc/openssl",
  90. "readOnly": true},
  91. { "name": "etcpki",
  92. "mountPath": "/etc/srv/pki",
  93. "readOnly": true},
  94. { "name": "srvsshproxy",
  95. "mountPath": "{{srv_sshproxy_path}}",
  96. "readOnly": false}
  97. ]
  98. }
  99. ],
  100. "volumes":[
  101. {{kms_socket_volume}}
  102. {{encryption_provider_volume}}
  103. {{cloud_config_volume}}
  104. {{additional_cloud_config_volume}}
  105. {{webhook_config_volume}}
  106. {{webhook_authn_config_volume}}
  107. {{audit_policy_config_volume}}
  108. {{audit_webhook_config_volume}}
  109. {{admission_controller_config_volume}}
  110. {{image_policy_webhook_config_volume}}
  111. { "name": "srvkube",
  112. "hostPath": {
  113. "path": "/etc/srv/kubernetes"}
  114. },
  115. { "name": "logfile",
  116. "hostPath": {
  117. "path": "/var/log/kube-apiserver.log",
  118. "type": "FileOrCreate"}
  119. },
  120. { "name": "auditlogfile",
  121. "hostPath": {
  122. "path": "/var/log/kube-apiserver-audit.log",
  123. "type": "FileOrCreate"}
  124. },
  125. { "name": "etcssl",
  126. "hostPath": {
  127. "path": "/etc/ssl"}
  128. },
  129. { "name": "usrsharecacerts",
  130. "hostPath": {
  131. "path": "/usr/share/ca-certificates"}
  132. },
  133. { "name": "varssl",
  134. "hostPath": {
  135. "path": "/var/ssl"}
  136. },
  137. { "name": "etcopenssl",
  138. "hostPath": {
  139. "path": "/etc/openssl"}
  140. },
  141. { "name": "etcpki",
  142. "hostPath": {
  143. "path": "/etc/srv/pki"}
  144. },
  145. { "name": "srvsshproxy",
  146. "hostPath": {
  147. "path": "{{srv_sshproxy_path}}"}
  148. }
  149. ]
  150. }}