Kubernetes Cluster in Proxmox VE (AlmaLinux/CentOS): Unterschied zwischen den Versionen

Zur Navigation springen Zur Suche springen
K
Zeile 160: Zeile 160:
</syntaxhighlight>Damit das nicht bei jeder neuen Sitzung wiederholt werden muss die Zeile am Ende von <code>.bash_profile</code> einfügen:<syntaxhighlight lang="bash">
</syntaxhighlight>Damit das nicht bei jeder neuen Sitzung wiederholt werden muss die Zeile am Ende von <code>.bash_profile</code> einfügen:<syntaxhighlight lang="bash">
vi ~/.bash_profile
vi ~/.bash_profile
</syntaxhighlight><nowiki>#</nowiki> Network overlay konfigurieren
</syntaxhighlight><nowiki>#</nowiki> Network overlay konfigurieren<syntaxhighlight lang="bash">
 
kubectl apply -f https://raw.githubusercontent.com/flannel-io/flannel/master/Documentation/kube-flannel.yml
kubectl apply -f <nowiki>https://raw.githubusercontent.com/flannel-io/flannel/master/Documentation/kube-flannel.yml</nowiki>
</syntaxhighlight><nowiki>##</nowiki> Auf dem Controller das join command anzeigen lassen<syntaxhighlight lang="bash">
 
kubeadm token create --print-join-command
<nowiki>######################</nowiki>
</syntaxhighlight><nowiki>######################</nowiki>


<nowiki>##</nowiki>  Nur auf worker   ##
<nowiki>##</nowiki>  Nur auf worker   ##


<nowiki>######################</nowiki>
<nowiki>######################</nowiki>
<nowiki>##</nowiki> Auf dem Controller das join command anzeigen lassen
kubeadm token create --print-join-command


<nowiki>#</nowiki> Auf node ausführen
<nowiki>#</nowiki> Auf node ausführen


<nowiki>#</nowiki> Auf dem controller überprüfen ob der node registreiert wurde
<nowiki>#</nowiki> Auf dem controller überprüfen ob der node registreiert wurde<syntaxhighlight lang="bash">
 
kubectl get nodes
kubectl get nodes
 
</syntaxhighlight>Ausgabe:<syntaxhighlight lang="bash">
k8s-ctrlr    Ready    control-plane   19m    v1.26.0
k8s-ctrlr  Ready  control-plane  19m    v1.26.0
 
k8s-node-1  Ready  <none>         3m1s    v1.26.0
k8s-node-1   Ready    <none>          3m1s   v1.26.0
</syntaxhighlight>
 




Navigationsmenü