mirror of https://github.com/easzlab/kubeasz.git
47 lines
1.6 KiB
Django/Jinja
47 lines
1.6 KiB
Django/Jinja
[Unit]
|
|
Description=Kubernetes API Server
|
|
Documentation=https://github.com/GoogleCloudPlatform/kubernetes
|
|
After=network.target
|
|
|
|
[Service]
|
|
ExecStart={{ bin_dir }}/kube-apiserver \
|
|
--advertise-address={{ inventory_hostname }} \
|
|
--allow-privileged=true \
|
|
--anonymous-auth=false \
|
|
--authorization-mode=Node,RBAC \
|
|
{% if BASIC_AUTH_ENABLE == "yes" %}
|
|
--basic-auth-file={{ ca_dir }}/basic-auth.csv \
|
|
{% endif %}
|
|
--bind-address={{ inventory_hostname }} \
|
|
--client-ca-file={{ ca_dir }}/ca.pem \
|
|
--endpoint-reconciler-type=lease \
|
|
--etcd-cafile={{ ca_dir }}/ca.pem \
|
|
--etcd-certfile={{ ca_dir }}/kubernetes.pem \
|
|
--etcd-keyfile={{ ca_dir }}/kubernetes-key.pem \
|
|
--etcd-servers={{ ETCD_ENDPOINTS }} \
|
|
--insecure-bind-address=127.0.0.1 \
|
|
--kubelet-https=true \
|
|
--kubelet-client-certificate={{ ca_dir }}/admin.pem \
|
|
--kubelet-client-key={{ ca_dir }}/admin-key.pem \
|
|
--service-account-key-file={{ ca_dir }}/ca-key.pem \
|
|
--service-cluster-ip-range={{ SERVICE_CIDR }} \
|
|
--service-node-port-range={{ NODE_PORT_RANGE }} \
|
|
--tls-cert-file={{ ca_dir }}/kubernetes.pem \
|
|
--tls-private-key-file={{ ca_dir }}/kubernetes-key.pem \
|
|
--requestheader-client-ca-file={{ ca_dir }}/ca.pem \
|
|
--requestheader-allowed-names= \
|
|
--requestheader-extra-headers-prefix=X-Remote-Extra- \
|
|
--requestheader-group-headers=X-Remote-Group \
|
|
--requestheader-username-headers=X-Remote-User \
|
|
--proxy-client-cert-file={{ ca_dir }}/aggregator-proxy.pem \
|
|
--proxy-client-key-file={{ ca_dir }}/aggregator-proxy-key.pem \
|
|
--enable-aggregator-routing=true \
|
|
--v=2
|
|
Restart=on-failure
|
|
RestartSec=5
|
|
Type=notify
|
|
LimitNOFILE=65536
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|