Giter Club home page Giter Club logo

kubernetes's Introduction

Commands

kubectl get nodes                      [Get all your nodes].
kubectl get nodes -o wide              [Get nodes with more information].
kubectl config view
kubectl describe node YourWorkerNodeName

Removing kubernetes for ubuntu

kubeadm reset
sudo apt-get purge kubeadm kubectl kubelet kubernetes-cni kube*   
sudo apt-get autoremove  
sudo rm -rf ~/.kube

making a {master and worker node} structure

1. Configuration - Master, Worker1, Worker2 Run the below commands in master and all your worker

2. cat <<EOF | sudo tee /etc/docker/daemon.json
{
"exec-opts": ["native.cgroupdriver=systemd"],
"log-driver": "json-file",
"log-opts": {
"max-size": "100m"
},
"storage-driver": "overlay2"
}
EOF

3. sudo systemctl enable docker
4. sudo systemctl daemon-reload
5. sudo systemctl restart docker
6. sudo swapoff -a


Run the below commands in master
1. sudo kubeadm init
2. mkdir -p $HOME/.kube
3. sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
4. sudo chown $(id -u):$(id -g) $HOME/.kube/config
5. kubectl apply -f https://docs.projectcalico.org/manifests/calico.yaml     -------- Container Network Interface (CNI)
  
6. sudo kubeadm token create --print-join-command    
Note : [the above command will provide you the kubeadm join command with your unique sha key
        after copying that paste it in your worker nodes]

to get unique token for connecting worker nodes

sudo kubeadm token create --print-join-command

kubernetes's People

Contributors

khot29 avatar

Watchers

 avatar

kubernetes's Issues

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.