configure cgroups
This commit is contained in:
parent
c9e0cbea4e
commit
09d40761a8
|
@ -80,6 +80,15 @@
|
|||
update_cache: yes
|
||||
name: ["kubelet", "kubeadm", "kubectl"]
|
||||
state: present
|
||||
- name: configure cgroup driver in kubelet
|
||||
lineinfile:
|
||||
path: /var/lib/kubelet/config.yaml
|
||||
line: 'cgroupDriver: systemd'
|
||||
regexp: '^cgroupDriver:.*'
|
||||
- name: configure kubeadm-env
|
||||
template:
|
||||
src: templates/kubeadm-flags.env
|
||||
dest: /var/lib/kubelet/kubeadm-flags.env
|
||||
- name: restart system
|
||||
command: reboot
|
||||
tags: ['initial', 'never']
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
{
|
||||
"exec-opts": ["native.cgroupdriver=systemd"],
|
||||
"log-driver": "json-file",
|
||||
"log-opts": {
|
||||
"max-size": "100m"
|
||||
},
|
||||
"storage-driver": "overlay2"
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
KUBELET_KUBEADM_ARGS=--cgroup-driver=systemd --network-plugin=cni --pod-infra-container-image=k8s.gcr.io/pause:3.1
|
|
@ -3,9 +3,9 @@ PrivateKey = {{ wg_secret_key }}
|
|||
ListenPort = 51820
|
||||
|
||||
[Peer]
|
||||
Endpoint = {{ hostvars['cluster-master'].ansible_ssh_host }}:51820
|
||||
PublicKey = {{ hostvars['cluster-master'].wg_public_key }}
|
||||
AllowedIPs = {{ hostvars['cluster-master'].wg_ip }}/32
|
||||
Endpoint = {{ hostvars['cluster-master01'].ansible_ssh_host }}:51820
|
||||
PublicKey = {{ hostvars['cluster-master01'].wg_public_key }}
|
||||
AllowedIPs = {{ hostvars['cluster-master01'].wg_ip }}/32
|
||||
|
||||
[Peer]
|
||||
Endpoint = {{ hostvars['cluster-worker01'].ansible_ssh_host }}:51820
|
||||
|
|
Loading…
Reference in New Issue