2023-12-17 23:50:19 +00:00
|
|
|
variant: fcos
|
|
|
|
version: 1.5.0
|
|
|
|
storage:
|
|
|
|
files:
|
|
|
|
# Hostname
|
|
|
|
- path: /etc/hostname
|
|
|
|
mode: 420
|
|
|
|
overwrite: true
|
|
|
|
contents:
|
|
|
|
inline: |
|
|
|
|
kube-node03
|
|
|
|
# CRI-O DNF module
|
|
|
|
- path: /etc/dnf/modules.d/cri-o.module
|
|
|
|
mode: 0644
|
|
|
|
overwrite: true
|
|
|
|
contents:
|
|
|
|
inline: |
|
|
|
|
[cri-o]
|
|
|
|
name=cri-o
|
2023-12-18 01:40:42 +00:00
|
|
|
stream=1.29
|
2023-12-17 23:50:19 +00:00
|
|
|
profiles=
|
|
|
|
state=enabled
|
|
|
|
# YUM repository for kubeadm, kubelet and kubectl
|
|
|
|
- path: /etc/yum.repos.d/kubernetes.repo
|
|
|
|
mode: 0644
|
|
|
|
overwrite: true
|
|
|
|
contents:
|
|
|
|
inline: |
|
|
|
|
[kubernetes]
|
|
|
|
name=Kubernetes
|
2023-12-18 01:00:24 +00:00
|
|
|
baseurl=https://pkgs.k8s.io/core:/stable:/v1.29/rpm/
|
2023-12-17 23:50:19 +00:00
|
|
|
enabled=1
|
|
|
|
gpgcheck=1
|
|
|
|
repo_gpgcheck=1
|
2023-12-18 01:00:24 +00:00
|
|
|
gpgkey=https://pkgs.k8s.io/core:/stable:/v1.29/rpm/repodata/repomd.xml.key
|
2023-12-17 23:50:19 +00:00
|
|
|
# configuring automatic loading of br_netfilter on startup
|
|
|
|
- path: /etc/modules-load.d/br_netfilter.conf
|
|
|
|
mode: 0644
|
|
|
|
overwrite: true
|
|
|
|
contents:
|
|
|
|
inline: br_netfilter
|
|
|
|
# setting kernel parameters required by kubelet
|
|
|
|
- path: /etc/sysctl.d/kubernetes.conf
|
|
|
|
mode: 0644
|
|
|
|
overwrite: true
|
|
|
|
contents:
|
|
|
|
inline: |
|
|
|
|
net.bridge.bridge-nf-call-iptables=1
|
|
|
|
net.ipv4.ip_forward=1
|
2023-12-18 01:10:56 +00:00
|
|
|
# script to install kubelet dependencies
|
|
|
|
- path: /usr/local/bin/install-kubelet.sh
|
|
|
|
mode: 0744
|
|
|
|
overwrite: true
|
|
|
|
contents:
|
|
|
|
inline: |
|
|
|
|
#!/bin/bash
|
2023-12-18 03:04:08 +00:00
|
|
|
rpm-ostree install kubelet kubeadm kubectl cri-o vim
|
2023-12-18 01:10:56 +00:00
|
|
|
systemctl enable crio kubelet
|
2023-12-18 05:28:51 +00:00
|
|
|
sleep 1 # systemctl enable and reboot race condition?
|
2023-12-18 01:10:56 +00:00
|
|
|
systemctl reboot
|
2023-12-18 01:40:42 +00:00
|
|
|
- path: /home/steven/cluster-config.yaml
|
|
|
|
mode: 0600
|
|
|
|
overwrite: true
|
|
|
|
contents:
|
|
|
|
inline: |
|
2023-12-18 01:50:55 +00:00
|
|
|
apiVersion: kubeadm.k8s.io/v1beta3
|
2023-12-18 01:40:42 +00:00
|
|
|
kind: ClusterConfiguration
|
|
|
|
controllerManager:
|
|
|
|
extraArgs:
|
2023-12-18 03:04:08 +00:00
|
|
|
flex-volume-plugin-dir: "/var/lib/kubelet/volumeplugins/nodeagent~uds"
|
|
|
|
networking:
|
|
|
|
podSubnet: "10.244.0.0/16"
|
|
|
|
---
|
|
|
|
apiVersion: kubeadm.k8s.io/v1beta3
|
|
|
|
kind: InitConfiguration
|
2023-12-18 01:40:42 +00:00
|
|
|
nodeRegistration:
|
|
|
|
kubeletExtraArgs:
|
2023-12-18 03:04:08 +00:00
|
|
|
volume-plugin-dir: "/var/lib/kubelet/volumeplugins/nodeagent~uds"
|
2023-12-18 01:40:42 +00:00
|
|
|
- path: /home/steven/join-config.yaml
|
|
|
|
mode: 0600
|
|
|
|
overwrite: true
|
|
|
|
contents:
|
|
|
|
inline: |
|
2023-12-18 01:50:55 +00:00
|
|
|
apiVersion: kubeadm.k8s.io/v1beta3
|
2023-12-18 01:40:42 +00:00
|
|
|
kind: JoinConfiguration
|
|
|
|
nodeRegistration:
|
|
|
|
kubeletExtraArgs:
|
2023-12-18 03:04:08 +00:00
|
|
|
volume-plugin-dir: "/var/lib/kubelet/volumeplugins/nodeagent~uds"
|
2023-12-17 23:50:19 +00:00
|
|
|
passwd: # setting login credentials
|
|
|
|
users:
|
2023-12-17 23:54:29 +00:00
|
|
|
- name: steven
|
2023-12-17 23:50:19 +00:00
|
|
|
ssh_authorized_keys:
|
|
|
|
- ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAQEAsPq55j525p1ntk37oeel83i6FVm9+ptWk/4csqZivKRrtfhSebtWj0GHg7mnN+XIvQFEXY1HuPSfAByuwURN7LrBTKYNDHM5VxyHSP3s6Ik9OYngbVDCcDRc94teivYalYPyC5rCfIFYRg+vrxD1Gl7eASpiS7z2YD5w6WSxEnQ9tk+GQgsbRcsDBpKTZL/yHZbNNOamUwv3FNmaDpq7V8d1IrKCQiivYQ5n/sWpQnOzMOnY5i7OKr2G56KbaVIXRe3JKIF7ifAK0aJ5q+45RmwdgVh+SgwIFBzQD4GZJbr8jbvxYO9NjbF9fm7qLYnbHNyT7cDx8ClQqAz/2cL0xw== taterwin10
|
2023-12-18 05:28:51 +00:00
|
|
|
- ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCf2HvSx2ls2KhHn3tISbYbx9NpYSKw+ESmOdxscZJuCEMKDEOdBuOJ5E3CpA+A+QiLY+qlXGPOyNKwmjVPFr6TzNwBciehcs3bFKAvar2vrJsQkUXAJiBzJWiQceGwto3zq6nIAO/tx7s3P6KVPuxegGyXAMv/7Fc8cytOk8q05Xt+7hUyz0LbCZ6j66/Qa7c8eJz8Vho1Oe1BpIhhcZbSovZrKgBOhpyIdUtxh/W5KnFsbIq4MPPVCRHN7IVrXcvkPsTQ6OGeJAsqun+zF3KupQs0Xqt157EmOn5D41x5QY7kts11QZiKmeeSFYt2gRaY7VtAlEfar0fgXWOyQ/Uf steven-pixel6a
|
2023-12-18 01:00:24 +00:00
|
|
|
groups: [ sudo, docker ]
|
|
|
|
systemd:
|
|
|
|
units:
|
|
|
|
- name: install-kubelet.service
|
|
|
|
enabled: true
|
|
|
|
contents: |
|
|
|
|
[Unit]
|
|
|
|
Before=systemd-user-sessions.service
|
|
|
|
Wants=network-online.target
|
|
|
|
After=network-online.target
|
|
|
|
ConditionPathExists=!/var/lib/install-kubelet
|
|
|
|
|
|
|
|
[Service]
|
|
|
|
Type=oneshot
|
|
|
|
ExecStart=/usr/local/bin/install-kubelet.sh
|
|
|
|
ExecStartPost=/usr/bin/touch /var/lib/install-kubelet
|
|
|
|
RemainAfterExit=yes
|
|
|
|
|
|
|
|
[Install]
|
|
|
|
WantedBy=multi-user.target
|