GithubHelp home page GithubHelp logo

join-new-worker-nodes-to-existing-k8s-cluster's Introduction

join new worker nodes to existing k8s cluster

Creating a New Token

  1. Using the kubeadm command, list your current tokens on the Master node. If your cluster was initialized over 24-hour ago, the list will likely be empty, since a token’s lifespan is only 24-hours.
kubeadm token list
  1. Create a new token using kubeadm. By using the –print-join-command argument kubeadm will output the token and SHA hash required to securely communicate with the master.
kubeadm token create --print-join-command

output will be similar like below

kubeadm join 192.168.92.241:6443 --token ssojq6.apl37fzj84v7wzo2 --discovery-token-ca-cert-hash sha256:7270b4d84d2110290f71ee0e8d2201c4bd594e9ffa13e0f6cf129b2286513d30
  1. Use kubeadm to list all tokens in order to verify our new one.
kubeadm token list

output will be similar like below

kubeadm token list output

Joining the New Worker to the Cluster

  1. Using SSH, log onto the new worker node.

  2. Use the kubeadm join command with our new token to join the node to our cluster.

kubeadm join 192.168.92.241:6443 --token ssojq6.apl37fzj84v7wzo2 --discovery-token-ca-cert-hash sha256:7270b4d84d2110290f71ee0e8d2201c4bd594e9ffa13e0f6cf129b2286513d30
  1. login to master node and check the worker node is successfully joned or not.
kubectl get nodes -owide

delete the token

  1. List the token first.
kubeadm token list

output will be similar like below kubeadm token list output

  1. Delete the token that you wish
kubeadm token delete lk3v5v.wdzpx0yonqseocoz

click here for link

@yannainglin

join-new-worker-nodes-to-existing-k8s-cluster's People

Contributors

mgyannainglin avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.