bureaucraten, interfacemoderatoren, Beheerders (Semantic MediaWiki), Curatoren (Semantic MediaWiki), Redacteuren (Semantic MediaWiki), toezichthouders, beheerders
205
bewerkingen
Geen bewerkingssamenvatting |
|||
Regel 115: | Regel 115: | ||
** After this, <code>kubectl get pods --all-namespaces</code> should show some additional pods. Most importantly, it should now show that CoreDNS is running. | ** After this, <code>kubectl get pods --all-namespaces</code> should show some additional pods. Most importantly, it should now show that CoreDNS is running. | ||
* Now, we can join our other nodes. <code>kubeadm init</code> will show a <code>kubeadm join</code> command at the end of its output, which you can run on the other nodes. If you don't have that output anymore, see [https://kubernetes.io/docs/reference/setup-tools/kubeadm/kubeadm-join/#token-based-discovery-with-ca-pinning this page on how to recreate a valid join command]. | * Now, we can join our other nodes. <code>kubeadm init</code> will show a <code>kubeadm join</code> command at the end of its output, which you can run on the other nodes. If you don't have that output anymore, see [https://kubernetes.io/docs/reference/setup-tools/kubeadm/kubeadm-join/#token-based-discovery-with-ca-pinning this page on how to recreate a valid join command]. | ||
** I also copied the <code>/etc/kubernetes/admin.conf</code> from the master to the other nodes (root-readable only), and set <code>KUBECONFIG=/etc/kubernetes/admin.conf</code>, so I could run <code>kubectl</code> on them. But that's up to you! | |||
Hopefully, after understanding all the concepts discussed earlier, this process was a matter of mere minutes! | Hopefully, after understanding all the concepts discussed earlier, this process was a matter of mere minutes! | ||
Regel 127: | Regel 128: | ||
kubetest3 Ready <none> 2d5h v1.13.4 | kubetest3 Ready <none> 2d5h v1.13.4 | ||
kubetest4 Ready master 2d5h v1.13.4 | kubetest4 Ready master 2d5h v1.13.4 | ||
</pre> | |||
By the way, you can run <code>kubectl</code> commands from your own machine as well by copying <code>/etc/kubernetes/admin.conf</code> from the master to your <code>$HOME/.kube/config</code>, and possibly after some firewall config to allow communications. | |||
'''TO DO: It should be possible to generate user credentials instead of taking admin credentials. But how?''' | |||
= Creating some basic pods = | |||
You'll see your cluster has no pods in the default namespace: | |||
<pre> | |||
$ kubectl get pods | |||
No resources found. | |||
</pre> | |||
The simplest thing we can do, now that we have a cluster, is run a random image with a random command, like before: | |||
<pre> | |||
$ kubectl run -ti --image=ubuntu:bionic bash | |||
root@bash-58654c7f4b-dhsbh:/# apt-get update && apt-get -y install lsb-release | |||
[....] | |||
root@bash-58654c7f4b-dhsbh:/# lsb_release -a | |||
No LSB modules are available. | |||
Distributor ID: Ubuntu | |||
Description: Ubuntu 18.04.1 LTS | |||
Release: 18.04 | |||
Codename: bionic | |||
</pre> | </pre> |