728x90
문제
~$ sudo kubeadm init
[init] Using Kubernetes version: v1.28.3
[preflight] Running pre-flight checks
error execution phase preflight: [preflight] Some fatal errors occurred:
[ERROR CRI]: container runtime is not running: output: time="2023-10-24T09:00:31Z" level=fatal msg="validate service connection: validate CRI v1 runtime API for endpoint \"unix:///var/run/containerd/containerd.sock\": rpc error: code = Unimplemented desc = unknown service runtime.v1.RuntimeService"
, error: exit status 1
[preflight] If you know what you are doing, you can make a check non-fatal with `--ignore-preflight-errors=...`
To see the stack trace of this error execute with --v=5 or higher
해결
~$ sudo apt remove containerd.io
~$ sudo apt install containerd.io
~$ sudo rm /etc/containerd/config.toml
~$ sudo systemctl restart containerd
~$ sudo kubeadm init
문제
$ sudo apt update
...
W: GPG error: https://prod-cdn.packages.k8s.io/repositories/isv:/kubernetes:/core:/stable:/v1.28/deb InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 234654DA9A296436
해결
sudo curl -fsSLo /usr/share/keyrings/kubernetes-archive-keyring.gpg https://dl.k8s.io/apt/doc/apt-key.gpg
echo "deb [signed-by=/usr/share/keyrings/kubernetes-archive-keyring.gpg] https://apt.kubernetes.io/ kubernetes-xenial main" | sudo tee /etc/apt/sources.list.d/kubernetes.list
문제
bad option; for several filesystems (e.g. nfs, cifs) you might need a /sbin/mount.<type> helper program.
해결
sudo apt install -y nfs-common
문제
The connection to the server localhost:8080 was refused - did you specify the right host or port
해결
sudo kubectl config view
확인 후 설정값이 없으면 아래 명령어 수행
mkdir -p $HOME/.kube
sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
sudo chown $(id -u):$(id -g) $HOME/.kube/config
kubectl apply -f https://raw.githubusercontent.com/flannel-io/flannel/master/Documentation/kube-flannel.yml
문제
MetalLB load balancer로 pod 노출 시 external-ip
해결
sudo kubectl config view
확인 후 설정값이 없으면 아래 명령어 수행
~$ sudo mkdir -p /kube/metallb && cd /kube/metallb
~$ kubectl apply -f https://raw.githubusercontent.com/metallb/metallb/v0.13.5/config/manifests/metallb-native.yaml
~$ sudo cat /kube/metallb/pool.yaml
apiVersion: metallb.io/v1beta1
kind: IPAddressPool
metadata:
name: metallb-pool
namespace: metallb-system
spec:
addresses:
- 172.30.1.200-172.30.1.254
~$ sudo cat /kube/metallb/l2.yaml
apiVersion: metallb.io/v1beta1
kind: L2Advertisement
metadata:
name: metallb-l2
namespace: metallb-system
'메모' 카테고리의 다른 글
속도와 보안을 한 단계 업그레이드! 새로운 DNS 추가의 완벽 가이드 (0) | 2023.11.27 |
---|---|
나만의 홈랩(HomeLab) 구축기 (0) | 2023.11.10 |
Type<Challenge[]> #Medium (0) | 2022.02.05 |
Node.js 플랫폼 (0) | 2022.02.04 |
Type<Challenge[]> #Easy (0) | 2022.02.04 |