Kubernetes環境を構築する
containerdとkubeadmを使うことにした
ここ と公式ドキュメントを参考
kubeは自動更新されないようにしている
code:zsh
# apt-mark showhold
kubeadm
kubectl
kubelet
おっと..
code:zsh
...
api-check The API server is not healthy after 4m0.001115915s
Unfortunately, an error has occurred:
context deadline exceeded
This error is likely caused by:
- The kubelet is not running
- The kubelet is unhealthy due to a misconfiguration of the node in some way (required cgroups disabled)
If you are on a systemd-powered system, you can try to troubleshoot the error with the following commands:
- 'systemctl status kubelet'
- 'journalctl -xeu kubelet'
Additionally, a control plane component may have crashed or exited when started by the container runtime.
To troubleshoot, list all containers using your preferred container runtimes CLI.
Here is one example how you may list all running Kubernetes containers by using crictl:
- 'crictl --runtime-endpoint unix:///var/run/containerd/containerd.sock ps -a | grep kube | grep -v pause'
Once you have found the failing container, you can inspect its logs with:
- 'crictl --runtime-endpoint unix:///var/run/containerd/containerd.sock logs CONTAINERID'
error execution phase wait-control-plane: could not initialize a Kubernetes cluster
To see the stack trace of this error execute with --v=5 or higher
しらべたら
きーたをみて
code:config.toml
plugins
plugins."io.containerd.grpc.v1.cri"
systemd_cgroup = false
をtrueに書き換えたところがダメだったらしい。
これ変えた記憶あると感じて調べたらちゃんと
code:config.toml
plugins."io.containerd.grpc.v1.cri".containerd.runtimes.runc.options
SystemdCgroup = true
書き換える場所は当たってた
んーわからん。AIに聞いてもわからん
Dockerとminikubeにすることにした
簡単にできた。しばらくはこれでいく。
nginxを入れてみる。
ipアドレスがnicのアドレスじゃないから繋がらなかった。
プロキシ実行したら行けた
どうやらサービスをゴニョゴニョするか、Ingressを使うといけるらしい
kubernetes nginx
kubernetes podを公開する
kubernetes マニュフェスト
kubernetes ダッシュボード