kube-apiserver.manifest 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  1. {
  2. "apiVersion": "v1",
  3. "kind": "Pod",
  4. "metadata": {
  5. "name":"kube-apiserver",
  6. "namespace": "kube-system",
  7. "annotations": {
  8. "seccomp.security.alpha.kubernetes.io/pod": "docker/default"
  9. },
  10. "labels": {
  11. "tier": "control-plane",
  12. "component": "kube-apiserver"
  13. }
  14. },
  15. "spec":{
  16. "priorityClass": "system-node-critical",
  17. "hostNetwork": true,
  18. "containers":[
  19. {
  20. "name": "kube-apiserver",
  21. "image": "{{pillar['kube_docker_registry']}}/kube-apiserver-amd64:{{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": "/livez?exclude=etcd&exclude=kms-provider-0&exclude=kms-provider-1"
  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": "/readyz"
  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. {{csc_config_mount}}
  67. {{audit_policy_config_mount}}
  68. {{audit_webhook_config_mount}}
  69. {{webhook_exec_auth_plugin_mount}}
  70. {{konnectivity_socket_mount}}
  71. { "name": "srvkube",
  72. "mountPath": "/etc/srv/kubernetes",
  73. "readOnly": true},
  74. { "name": "logfile",
  75. "mountPath": "/var/log/kube-apiserver.log",
  76. "readOnly": false},
  77. { "name": "auditlogfile",
  78. "mountPath": "/var/log/kube-apiserver-audit.log",
  79. "readOnly": false},
  80. { "name": "etcssl",
  81. "mountPath": "/etc/ssl",
  82. "readOnly": true},
  83. { "name": "usrsharecacerts",
  84. "mountPath": "/usr/share/ca-certificates",
  85. "readOnly": true},
  86. { "name": "varssl",
  87. "mountPath": "/var/ssl",
  88. "readOnly": true},
  89. { "name": "etcopenssl",
  90. "mountPath": "/etc/openssl",
  91. "readOnly": true},
  92. { "name": "etcpki",
  93. "mountPath": "/etc/srv/pki",
  94. "readOnly": true},
  95. { "name": "srvsshproxy",
  96. "mountPath": "{{srv_sshproxy_path}}",
  97. "readOnly": false}
  98. ]
  99. }
  100. ],
  101. "volumes":[
  102. {{kms_socket_volume}}
  103. {{encryption_provider_volume}}
  104. {{cloud_config_volume}}
  105. {{additional_cloud_config_volume}}
  106. {{webhook_config_volume}}
  107. {{webhook_authn_config_volume}}
  108. {{csc_config_volume}}
  109. {{audit_policy_config_volume}}
  110. {{audit_webhook_config_volume}}
  111. {{webhook_exec_auth_plugin_volume}}
  112. {{konnectivity_socket_volume}}
  113. { "name": "srvkube",
  114. "hostPath": {
  115. "path": "/etc/srv/kubernetes"}
  116. },
  117. { "name": "logfile",
  118. "hostPath": {
  119. "path": "/var/log/kube-apiserver.log",
  120. "type": "FileOrCreate"}
  121. },
  122. { "name": "auditlogfile",
  123. "hostPath": {
  124. "path": "/var/log/kube-apiserver-audit.log",
  125. "type": "FileOrCreate"}
  126. },
  127. { "name": "etcssl",
  128. "hostPath": {
  129. "path": "/etc/ssl"}
  130. },
  131. { "name": "usrsharecacerts",
  132. "hostPath": {
  133. "path": "/usr/share/ca-certificates"}
  134. },
  135. { "name": "varssl",
  136. "hostPath": {
  137. "path": "/var/ssl"}
  138. },
  139. { "name": "etcopenssl",
  140. "hostPath": {
  141. "path": "/etc/openssl"}
  142. },
  143. { "name": "etcpki",
  144. "hostPath": {
  145. "path": "/etc/srv/pki"}
  146. },
  147. { "name": "srvsshproxy",
  148. "hostPath": {
  149. "path": "{{srv_sshproxy_path}}"}
  150. }
  151. ]
  152. }}