-
Create the environment using vagrant
vagrant up
-
Set up machines for kubernetes cluster
ansible-playbook cluster.yaml -i inventory
-
On the first master node init the cluster
sudo kubeadm init --apiserver-advertise-address=10.0.0.10 \ --pod-network-cidr=192.168.0.0/16 --control-plane-endpoint 10.0.0.9:8443 \ --upload-certs
-
Set up kubectl
mkdir -p $HOME/.kube sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config sudo chown $(id -u):$(id -g) $HOME/.kube/config
-
Set up networking plugin
kubectl create -f https://projectcalico.docs.tigera.io/manifests/tigera-operator.yaml kubectl create -f https://projectcalico.docs.tigera.io/manifests/custom-resources.yaml
-
Join second master node
sudo kubeadm join 10.0.0.9:8443 --token TOKEN \ --apiserver-advertise-address=10.0.0.11 \ --discovery-token-ca-cert-hash DISCOVERY_TOKEN \ --control-plane --certificate-key CERTIFICATE_KEY
-
Join third master node
sudo kubeadm join 10.0.0.9:8443 --token TOKEN \ --apiserver-advertise-address=10.0.0.12 \ --discovery-token-ca-cert-hash DISCOVERY_TOKEN \ --control-plane --certificate-key CERTIFICATE_KEY
-
Join worker nodes, run it on both nodes
sudo kubeadm join 10.0.0.9:8443 --token TOKEN \ --discovery-token-ca-cert-hash DISCOVERY_TOKEN
-
Run demo app
kubectl apply -f https://k8s.io/examples/application/deployment.yaml
-
Notifications
You must be signed in to change notification settings - Fork 0
kzwolenik95/k8s-on-premise
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
No description, website, or topics provided.
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published