Skip to content

asmigar/create-k8s-cluster

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Pre-requisite

Setup

  1. Apply the terraform project.
terraform init; terraform apply

This will create one k8s master/control-plane node along with two worker nodes.

This will output

  • ssh commands to access the swarm nodes.
  1. Ssh into the k8s master node(ssh command details available in terraform apply output from step 2)
  2. [Run on Manager Node] Get the join-token and ca cert hash:
kubeadm token list
openssl x509 -pubkey -in /etc/kubernetes/pki/ca.crt | openssl rsa -pubin -outform der 2>/dev/null | \
   openssl dgst -sha256 -hex | sed 's/^.* //'
  1. Copy the token and cert sha.

  2. Ssh into worker nodes(ssh command details available in terraform apply output from step 2)

  3. [Run on all workers nodes]Run join token command along with token&hash(copied from step 4). control-plane-host is the private ip of the master node.

kubeadm join --token <token> <control-plane-host>:6443 --discovery-token-ca-cert-hash sha256:<hash>

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages