splitting doku
This commit is contained in:
@@ -3,128 +3,4 @@
|
||||
## OS Installation
|
||||
Als Basis-Installation wird Debian 13 verwendet. Standard-Installation mit SSH-Server und Standard-Tools. Update / Upgrade aller Pakete auf aktuellen Stand.
|
||||
|
||||
## Vorbereitung Controll Plane
|
||||
* Benötigte Pakete installieren
|
||||
```
|
||||
apt update
|
||||
apt -y install containerd curl gpg
|
||||
```
|
||||
|
||||
* Konfiguration für containerd erstellen
|
||||
```
|
||||
containerd config default | tee /etc/containerd/config.toml
|
||||
```
|
||||
|
||||
* Anpassen der config.toml
|
||||
```
|
||||
nano /etc/containerd/config.toml
|
||||
```
|
||||
Anpassen folgender Zeilen
|
||||
```
|
||||
sandbox_image = "registry.k8s.io/pause:3.10"
|
||||
SystemdCgroup = true
|
||||
```
|
||||
|
||||
* Dienst neu starten
|
||||
```
|
||||
systemctl restart containerd
|
||||
```
|
||||
|
||||
* Systemparameter anpassen
|
||||
```
|
||||
cat > /etc/sysctl.d/99-k8s-cri.conf <<EOF
|
||||
net.bridge.bridge-nf-call-iptables=1
|
||||
net.bridge.bridge-nf-call-ip6tables=1
|
||||
net.ipv4.ip_forward=1
|
||||
EOF
|
||||
```
|
||||
* und anwenden
|
||||
```
|
||||
sysctl --system
|
||||
```
|
||||
|
||||
* Swap abschalten und auskommentieren
|
||||
```
|
||||
swapoff -a
|
||||
nano /etc/fstab
|
||||
```
|
||||
|
||||
## Kubernetes installieren (auf allen Knoten)
|
||||
* Pakete für Kubernetes installieren (kubectl, kubeadm, kubelet)
|
||||
```
|
||||
curl -fsSL https://pkgs.k8s.io/core:/stable:/v1.33/deb/Release.key | gpg --dearmor -o /etc/apt/keyrings/kubernetes-apt-keyring.gpg
|
||||
echo "deb [signed-by=/etc/apt/keyrings/kubernetes-apt-keyring.gpg] https://pkgs.k8s.io/core:/stable:/v1.33/deb/ /" | tee /etc/apt/sources.list.d/kubernetes.list
|
||||
apt update
|
||||
apt -y install kubeadm kubelet kubectl
|
||||
```
|
||||
|
||||
* cni verknüpfen
|
||||
```
|
||||
ln -s /opt/cni/bin /usr/lib/cni
|
||||
```
|
||||
|
||||
## Control Plane Node einrichten
|
||||
* Konfiguration erstellen und anpassen (config.yaml)
|
||||
```
|
||||
apiVersion: kubeadm.k8s.io/v1beta4
|
||||
bootstrapTokens:
|
||||
- groups:
|
||||
- system:bootstrappers:kubeadm:default-node-token
|
||||
token: abcdef.0123456789abcdef
|
||||
ttl: 24h0m0s
|
||||
usages:
|
||||
- signing
|
||||
- authentication
|
||||
kind: InitConfiguration
|
||||
localAPIEndpoint:
|
||||
advertiseAddress: 192.168.0.72
|
||||
bindPort: 6443
|
||||
nodeRegistration:
|
||||
criSocket: unix:///var/run/containerd/containerd.sock
|
||||
imagePullPolicy: IfNotPresent
|
||||
imagePullSerial: true
|
||||
name: dlp.realm.local
|
||||
taints: null
|
||||
timeouts:
|
||||
controlPlaneComponentHealthCheck: 4m0s
|
||||
discovery: 5m0s
|
||||
etcdAPICall: 2m0s
|
||||
kubeletHealthCheck: 4m0s
|
||||
kubernetesAPICall: 1m0s
|
||||
tlsBootstrap: 5m0s
|
||||
upgradeManifests: 5m0s
|
||||
---
|
||||
controlPlaneEndpoint: "192.168.0.71:6443"
|
||||
apiServer: {}
|
||||
apiVersion: kubeadm.k8s.io/v1beta4
|
||||
caCertificateValidityPeriod: 87600h0m0s
|
||||
certificateValidityPeriod: 8760h0m0s
|
||||
certificatesDir: /etc/kubernetes/pki
|
||||
clusterName: kubernetes
|
||||
controllerManager: {}
|
||||
dns: {}
|
||||
encryptionAlgorithm: RSA-2048
|
||||
etcd:
|
||||
local:
|
||||
dataDir: /var/lib/etcd
|
||||
imageRepository: registry.k8s.io
|
||||
kind: ClusterConfiguration
|
||||
kubernetesVersion: 1.33.0
|
||||
networking:
|
||||
dnsDomain: cluster.local
|
||||
serviceSubnet: 10.96.0.0/12
|
||||
proxy: {}
|
||||
scheduler: {}
|
||||
---
|
||||
apiVersion: kubeproxy.config.k8s.io/v1alpha1
|
||||
kind: KubeProxyConfiguration
|
||||
mode: "ipvs"
|
||||
ipvs:
|
||||
strictARP: true
|
||||
```
|
||||
|
||||
* Control Plane Node anstarten
|
||||
```
|
||||
kubeadm init --config=config.yaml
|
||||
```
|
||||
|
||||
|
||||
@@ -0,0 +1,124 @@
|
||||
## Vorbereitung Controll Plane
|
||||
* Benötigte Pakete installieren
|
||||
```
|
||||
apt update
|
||||
apt -y install containerd curl gpg
|
||||
```
|
||||
|
||||
* Konfiguration für containerd erstellen
|
||||
```
|
||||
containerd config default | tee /etc/containerd/config.toml
|
||||
```
|
||||
|
||||
* Anpassen der config.toml
|
||||
```
|
||||
nano /etc/containerd/config.toml
|
||||
```
|
||||
Anpassen folgender Zeilen
|
||||
```
|
||||
sandbox_image = "registry.k8s.io/pause:3.10"
|
||||
SystemdCgroup = true
|
||||
```
|
||||
|
||||
* Dienst neu starten
|
||||
```
|
||||
systemctl restart containerd
|
||||
```
|
||||
|
||||
* Systemparameter anpassen
|
||||
```
|
||||
cat > /etc/sysctl.d/99-k8s-cri.conf <<EOF
|
||||
net.bridge.bridge-nf-call-iptables=1
|
||||
net.bridge.bridge-nf-call-ip6tables=1
|
||||
net.ipv4.ip_forward=1
|
||||
EOF
|
||||
```
|
||||
* und anwenden
|
||||
```
|
||||
sysctl --system
|
||||
```
|
||||
|
||||
* Swap abschalten und auskommentieren
|
||||
```
|
||||
swapoff -a
|
||||
nano /etc/fstab
|
||||
```
|
||||
|
||||
## Kubernetes installieren (auf allen Knoten)
|
||||
* Pakete für Kubernetes installieren (kubectl, kubeadm, kubelet)
|
||||
```
|
||||
curl -fsSL https://pkgs.k8s.io/core:/stable:/v1.33/deb/Release.key | gpg --dearmor -o /etc/apt/keyrings/kubernetes-apt-keyring.gpg
|
||||
echo "deb [signed-by=/etc/apt/keyrings/kubernetes-apt-keyring.gpg] https://pkgs.k8s.io/core:/stable:/v1.33/deb/ /" | tee /etc/apt/sources.list.d/kubernetes.list
|
||||
apt update
|
||||
apt -y install kubeadm kubelet kubectl
|
||||
```
|
||||
|
||||
* cni verknüpfen
|
||||
```
|
||||
ln -s /opt/cni/bin /usr/lib/cni
|
||||
```
|
||||
|
||||
## Control Plane Node einrichten
|
||||
* Konfiguration erstellen und anpassen (config.yaml)
|
||||
```
|
||||
apiVersion: kubeadm.k8s.io/v1beta4
|
||||
bootstrapTokens:
|
||||
- groups:
|
||||
- system:bootstrappers:kubeadm:default-node-token
|
||||
token: abcdef.0123456789abcdef
|
||||
ttl: 24h0m0s
|
||||
usages:
|
||||
- signing
|
||||
- authentication
|
||||
kind: InitConfiguration
|
||||
localAPIEndpoint:
|
||||
advertiseAddress: 192.168.0.72
|
||||
bindPort: 6443
|
||||
nodeRegistration:
|
||||
criSocket: unix:///var/run/containerd/containerd.sock
|
||||
imagePullPolicy: IfNotPresent
|
||||
imagePullSerial: true
|
||||
name: dlp.realm.local
|
||||
taints: null
|
||||
timeouts:
|
||||
controlPlaneComponentHealthCheck: 4m0s
|
||||
discovery: 5m0s
|
||||
etcdAPICall: 2m0s
|
||||
kubeletHealthCheck: 4m0s
|
||||
kubernetesAPICall: 1m0s
|
||||
tlsBootstrap: 5m0s
|
||||
upgradeManifests: 5m0s
|
||||
---
|
||||
controlPlaneEndpoint: "192.168.0.71:6443"
|
||||
apiServer: {}
|
||||
apiVersion: kubeadm.k8s.io/v1beta4
|
||||
caCertificateValidityPeriod: 87600h0m0s
|
||||
certificateValidityPeriod: 8760h0m0s
|
||||
certificatesDir: /etc/kubernetes/pki
|
||||
clusterName: kubernetes
|
||||
controllerManager: {}
|
||||
dns: {}
|
||||
encryptionAlgorithm: RSA-2048
|
||||
etcd:
|
||||
local:
|
||||
dataDir: /var/lib/etcd
|
||||
imageRepository: registry.k8s.io
|
||||
kind: ClusterConfiguration
|
||||
kubernetesVersion: 1.33.0
|
||||
networking:
|
||||
dnsDomain: cluster.local
|
||||
serviceSubnet: 10.96.0.0/12
|
||||
proxy: {}
|
||||
scheduler: {}
|
||||
---
|
||||
apiVersion: kubeproxy.config.k8s.io/v1alpha1
|
||||
kind: KubeProxyConfiguration
|
||||
mode: "ipvs"
|
||||
ipvs:
|
||||
strictARP: true
|
||||
```
|
||||
|
||||
* Control Plane Node anstarten
|
||||
```
|
||||
kubeadm init --config=config.yaml
|
||||
```
|
||||
Reference in New Issue
Block a user