Loading...
「ツール」は右上に移動しました。
利用したサーバー: wtserver1
19いいね 541 views回再生

Kubernetes multi node local cluster | Kubernetes simplified | DevOps

Join the India's Largest Tech Cult!

🏆 Enter 2021 contest here - https://gleam.io/aEOQ8/giveaway-free-...

Winners will get:

🧫 Alexa Echo Dot 4th Generation

👕 Cool T-Shirts

💻 Laptop Stickers

#multinode #kubernetes #10mins

If you are using Minikube and want to have a cluster with multiple nodes but worried it will take days to set up one?. Let me show you how to do this in just 10 mins.
This cluster can be used for your local development and testing, also learning all Kubernetes features.
I am going to use Multipass and K3S to set up this cluster.

This will bring up each node of the cluster as a separate Ubuntu VM.

I have also shown in the past how to use KIND to setup similar multinode cluster but it was using docker container for nodes, refer below

🎬 -    • Kubernetes Simply Explained | Kubernetes S...  


💻 Commands used:
===================

multipass launch -n control-plane
multipass launch -n worker1
multipass launch -n worker2
multipass exec control-plane -- bash -c "curl -sfL https://get.k3s.io | sh -"
TOKEN=$(multipass exec control-plane -- bash -c "sudo cat /var/lib/rancher/k3s/server/node-token")
multipass info control-plane
IP=192.168.149.251
multipass exec worker1 -- bash -c "curl -sfL https://get.k3s.io | K3S_URL=\"https://$IP:6443\" K3S_TOKEN=\"$TOKEN\" sh -"
multipass exec worker2 -- bash -c "curl -sfL https://get.k3s.io | K3S_URL=\"https://$IP:6443\" K3S_TOKEN=\"$TOKEN\" sh -"

multipass exec control-plane -- bash -c "sudo cat /etc/rancher/k3s/k3s.yaml" and store it in k3s.yaml

notepad k3s.yaml

export KUBECONFIG=k3s.yaml

コメント