
Ich habe Ubuntu 20.03 auf VirtualBox neu erstellt und dann anhand der Dokumentation mit der Installation begonnen. Die Maschine hat eine Quadro RTX-Karte (vielleicht hat das Auswirkungen?).
Die Dokumentation ist chaotisch, weil es so viele Möglichkeiten gibt. Was auch immer ich überprüft habe, fast alle Möglichkeiten und die Ergebnisse waren sehr schlecht, weil sie nie zum Erfolg geführt haben. Können Sie bei dieser Installation helfen oder funktioniert Ubuntu Kubernetes vielleicht nicht und es ist Zeitverschwendung?
Werden zusätzliche Protokolle benötigt?
Ungültige Dokumentation, die zu diesen Fehlern führt:
- https://ubuntu.com/kubernetes/install#multi-node
- https://ubuntu.com/kubernetes/docs/install-manual
- https://ubuntu.com/kubernetes/docs/install-local
Als erstes versuche ich:
sudo snap install lxd
sudo lxd init
# all default apart:
# dir
# ipv6 none
sudo snap install juju --classic
juju bootstrap localhost
juju add-model k8s
juju deploy charmed-kubernetes
Das Ergebnis sind 10 Maschinen und keine funktionierenden Master :)
kubernetes-master/0* waiting idle 5 10.184.167.240 6443/tcp Waiting for 3 kube-system pods to start
containerd/2 active idle 10.184.167.240 Container runtime available
flannel/2 active idle 10.184.167.240 Flannel subnet 10.1.1.1/24
kubernetes-master/1 waiting idle 6 10.184.167.89 6443/tcp Waiting for 3 kube-system pods to start
containerd/3 active idle 10.184.167.89 Container runtime available
flannel/3 active idle 10.184.167.89 Flannel subnet 10.1.43.1/24
Der vollständige Status lautet:
juju status --color
Model Controller Cloud/Region Version SLA Timestamp
k8s-production localhost-localhost localhost/localhost 2.8.9 unsupported 17:00:24+01:00
App Version Status Scale Charm Store Rev OS Notes
containerd 1.3.3 active 5 containerd jujucharms 102 ubuntu
easyrsa 3.0.1 active 1 easyrsa jujucharms 345 ubuntu
etcd 3.4.5 active 3 etcd jujucharms 553 ubuntu
flannel 0.11.0 active 5 flannel jujucharms 518 ubuntu
kubeapi-load-balancer 1.18.0 active 1 kubeapi-load-balancer jujucharms 757 ubuntu exposed
kubernetes-master 1.20.4 waiting 2 kubernetes-master jujucharms 955 ubuntu
kubernetes-worker 1.20.4 active 3 kubernetes-worker jujucharms 726 ubuntu exposed
Unit Workload Agent Machine Public address Ports Message
easyrsa/0* active idle 0 10.184.167.48 Certificate Authority connected.
etcd/0* active idle 1 10.184.167.23 2379/tcp Healthy with 3 known peers
etcd/1 active idle 2 10.184.167.180 2379/tcp Healthy with 3 known peers
etcd/2 active idle 3 10.184.167.194 2379/tcp Healthy with 3 known peers
kubeapi-load-balancer/0* active idle 4 10.184.167.106 443/tcp Loadbalancer ready.
kubernetes-master/0* waiting idle 5 10.184.167.240 6443/tcp Waiting for 3 kube-system pods to start
containerd/2 active idle 10.184.167.240 Container runtime available
flannel/2 active idle 10.184.167.240 Flannel subnet 10.1.1.1/24
kubernetes-master/1 waiting idle 6 10.184.167.89 6443/tcp Waiting for 3 kube-system pods to start
containerd/3 active idle 10.184.167.89 Container runtime available
flannel/3 active idle 10.184.167.89 Flannel subnet 10.1.43.1/24
kubernetes-worker/0* active idle 7 10.184.167.52 80/tcp,443/tcp Kubernetes worker running.
containerd/0* active idle 10.184.167.52 Container runtime available
flannel/0* active idle 10.184.167.52 Flannel subnet 10.1.20.1/24
kubernetes-worker/1 active idle 8 10.184.167.226 80/tcp,443/tcp Kubernetes worker running.
containerd/4 active idle 10.184.167.226 Container runtime available
flannel/4 active idle 10.184.167.226 Flannel subnet 10.1.6.1/24
kubernetes-worker/2 active idle 9 10.184.167.158 80/tcp,443/tcp Kubernetes worker running.
containerd/1 active idle 10.184.167.158 Container runtime available
flannel/1 active idle 10.184.167.158 Flannel subnet 10.1.12.1/24
Machine State DNS Inst id Series AZ Message
0 started 10.184.167.48 juju-c4f295-0 focal Running
1 started 10.184.167.23 juju-c4f295-1 focal Running
2 started 10.184.167.180 juju-c4f295-2 focal Running
3 started 10.184.167.194 juju-c4f295-3 focal Running
4 started 10.184.167.106 juju-c4f295-4 focal Running
5 started 10.184.167.240 juju-c4f295-5 focal Running
6 started 10.184.167.89 juju-c4f295-6 focal Running
7 started 10.184.167.52 juju-c4f295-7 focal Running
8 started 10.184.167.226 juju-c4f295-8 focal Running
9 started 10.184.167.158 juju-c4f295-9 focal Running
Dasselbe gilt für andere Sequenzierungen aus der Dokumentation, die alle zu nichts führen. Vielleicht mache ich etwas falsch, vielleicht funktioniert Ubuntu Kubernetes auf dem lokalen Host einfach nicht.
juju add-model k8s-production
juju deploy cs:bundle/charmed-kubernetes-596
Selbst diese kleine Bereitstellung funktioniert nicht (die Installation endet nie).
juju add-model k8s-development
juju deploy cs:bundle/kubernetes-core-1200
Antwort1
Ich sehe aus, als wäre dies eine Problemumgehung:
juju config kubernetes-worker kubelet-extra-config='{protectKernelDefaults: false}'
https://bugs.launchpad.net/charmed-kubernetes-bundles/+bug/1918160