Writing an ansible playbook that will automatically configure a kubernetes cluster
ok
lame is a whore
>>13173786lamb is a whore
>>13173367It takes a surprising amount of time to write good configurations.I'm almost done with my main arr stack, then I'll probably move on to some thorough testing, and network configurations.
>>13173367---- name: Prepare all Kubernetes nodes hosts: k8s become: true vars: kubernetes_version: "1.34" tasks: - name: Disable swap immediately ansible.builtin.command: swapoff -a when: ansible_swaptotal_mb > 0 - name: Disable swap permanently ansible.builtin.replace: path: /etc/fstab regexp: '^(\s*[^#]\S+\s+\S+\s+swap\s+.*)$' replace: '# \1' - name: Load required kernel modules community.general.modprobe: name: "{{ item }}" state: present loop: - overlay - br_netfilter - name: Configure Kubernetes networking ansible.builtin.copy: dest: /etc/sysctl.d/99-kubernetes.conf mode: "0644" content: | net.bridge.bridge-nf-call-iptables = 1 net.bridge.bridge-nf-call-ip6tables = 1 net.ipv4.ip_forward = 1 - name: Apply sysctl configuration ansible.builtin.command: sysctl --system - name: Install prerequisites ansible.builtin.apt: name: - apt-transport-https - ca-certificates - curl - gpg state: present update_cache: true - name: Create Kubernetes keyring directory ansible.builtin.file: path: /etc/apt/keyrings state: directory mode: "0755" - name: Add Kubernetes repository key ansible.builtin.get_url: url: "https://pkgs.k8s.io/core:/stable:/v{{ kubernetes_version }}/deb/Release.key" dest: /etc/apt/keyrings/kubernetes-apt-keyring.asc mode: "0644" - name: Add Kubernetes repository ansible.builtin.apt_repository: repo: >- deb [signed-by=/etc/apt/keyrings/kubernetes-apt-keyring.asc] https://pkgs.k8s.io/core:/stable:/v{{ kubernetes_version }}/deb/ / filename: kubernetes state: present>etc
>>13173822who ‘s thatYour fortune: Good Luck
>>13173367i want to plap lain