This commit is contained in:
parent
7e5eb1911e
commit
58fae5e1bd
6 changed files with 96 additions and 16 deletions
|
|
@ -1,2 +1,2 @@
|
|||
#https://kubernetes.io/docs/reference/command-line-tools-reference/feature-gates/#feature-gates
|
||||
KUBELET_EXTRA_ARGS="{% if ansible_service_mgr == "systemd" %}--cgroup-driver=systemd {% endif %}--container-runtime=remote --runtime-request-timeout=5m --container-runtime-endpoint={% if kubernetes_cri == "containerd" %}unix:///run/containerd/containerd.sock{% elif kubernetes_cri == "cri-o" %}unix:///var/run/crio/crio.sock{% endif %} --node-ip={{ ansible_eth0.ipv4.address }}"
|
||||
KUBELET_EXTRA_ARGS="--container-runtime=remote --container-runtime-endpoint={% if kubernetes_cri == "containerd" %}unix:///run/containerd/containerd.sock{% elif kubernetes_cri == "cri-o" %}unix:///var/run/crio/crio.sock{% endif %} --node-ip={{ ansible_eth0.ipv4.address }}"
|
||||
|
|
|
|||
|
|
@ -1,2 +1,2 @@
|
|||
[Service]
|
||||
Environment=KUBELET_EXTRA_ARGS="--cgroup-driver=systemd --container-runtime=remote --runtime-request-timeout=5m --container-runtime-endpoint={% if kubernetes_cri == "containerd" %}unix:///run/containerd/containerd.sock{% elif kubernetes_cri == "cri-o" %}unix:///var/run/crio/crio.sock{% endif %} --node-ip={{ ansible_eth0.ipv4.address }}"
|
||||
Environment=KUBELET_EXTRA_ARGS="--container-runtime=remote --container-runtime-endpoint={% if kubernetes_cri == "containerd" %}unix:///run/containerd/containerd.sock{% elif kubernetes_cri == "cri-o" %}unix:///var/run/crio/crio.sock{% endif %} --node-ip={{ ansible_eth0.ipv4.address }}"
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ nodeRegistration:
|
|||
localAPIEndpoint:
|
||||
advertiseAddress: "{{ ansible_default_ipv4.address }}"
|
||||
bindPort: 6443
|
||||
{% if kubernetes_master|bool %}
|
||||
{% if kubernetes_master|bool and groups['KubernetesMasterConfigured'] is defined %}
|
||||
certificateKey: "{{ kubernetes_certificateKey.stdout }}"
|
||||
{% endif %}
|
||||
---
|
||||
|
|
@ -53,14 +53,18 @@ controlPlane:
|
|||
localAPIEndpoint:
|
||||
advertiseAddress: "{{ ansible_default_ipv4.address }}"
|
||||
bindPort: 6443
|
||||
{% if groups['KubernetesMasterConfigured'] is defined %}
|
||||
certificateKey: "{{ kubernetes_certificateKey.stdout }}"
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
discovery:
|
||||
bootstrapToken:
|
||||
apiServerEndpoint: "{{ lb_kubemaster }}:6443"
|
||||
{% if groups['KubernetesMasterConfigured'] is defined %}
|
||||
caCertHashes:
|
||||
- sha256:{{ cacerthash.stdout }}
|
||||
token: "{{ kubetoken.stdout }}"
|
||||
{% endif %}
|
||||
nodeRegistration:
|
||||
kubeletExtraArgs:
|
||||
node-ip: {{ ansible_default_ipv4.address }}
|
||||
|
|
@ -117,3 +121,20 @@ mode: {{ kubernetes_kubeproxy_mode }}
|
|||
---
|
||||
apiVersion: kubelet.config.k8s.io/v1beta1
|
||||
kind: KubeletConfiguration
|
||||
runtimeRequestTimeout: 5m
|
||||
{% if ansible_service_mgr == "systemd" %}
|
||||
cgroupDriver: systemd
|
||||
{% endif %}
|
||||
|
||||
{% if false %}
|
||||
readOnlyPort: 1
|
||||
systemReserved:
|
||||
cpu=200m,memory=200M
|
||||
|
||||
containerRuntime: remote
|
||||
{% if kubernetes_cri == "containerd" %}
|
||||
containerRuntimeEndpoint: "unix:///run/containerd/containerd.sock"
|
||||
{% elif kubernetes_cri == "cri-o" %}
|
||||
containerRuntimeEndpoint: "unix:///var/run/crio/crio.sock"
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue