install-k8s-on-ubuntu-2204/initialize-k8s-ctrlr.sh
Eliezer Croitoru 3cc31c085a 16
2024-01-28 18:27:05 +00:00

14 lines
357 B
Bash
Executable File

#!/usr/bin/env bash
kubeadm config images pull --cri-socket /run/containerd/containerd.sock
kubeadm init \
--pod-network-cidr=10.244.0.0/16 \
--upload-certs \
--node-name $(hostname -f ) \
--control-plane-endpoint=$(hostname -f )
mkdir -p $HOME/.kube
cp -f /etc/kubernetes/admin.conf $HOME/.kube/config
chown $(id -u):$(id -g) $HOME/.kube/config