configure cgroups

This commit is contained in:
chris 2019-05-24 13:37:13 +02:00
parent c9e0cbea4e
commit 09d40761a8
4 changed files with 21 additions and 3 deletions

View File

@ -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']

View File

@ -0,0 +1,8 @@
{
"exec-opts": ["native.cgroupdriver=systemd"],
"log-driver": "json-file",
"log-opts": {
"max-size": "100m"
},
"storage-driver": "overlay2"
}

View File

@ -0,0 +1 @@
KUBELET_KUBEADM_ARGS=--cgroup-driver=systemd --network-plugin=cni --pod-infra-container-image=k8s.gcr.io/pause:3.1

View File

@ -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