Giter VIP home page Giter VIP logo

awesome-kubernetes's Introduction

  1. Prerequisites: Multiple Linux servers (at least 1 for master and 1 or more for worker nodes). A user with sudo privileges on these servers. All nodes should have swap disabled, as Kubernetes recommends.

  2. Install Docker: On all nodes (master and workers):

sudo apt-get update
sudo apt-get install -y docker.io
  1. Install Kubernetes Components: On all nodes:

Add Kubernetes apt repository:

curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add -
echo "deb https://apt.kubernetes.io/ kubernetes-xenial main" | sudo tee -a /etc/apt/sources.list.d/kubernetes.list
sudo apt-get update

Install kubelet, kubeadm, and kubectl:

sudo apt-get install -y kubelet kubeadm kubectl
Hold them at the current version:


sudo apt-mark hold kubelet kubeadm kubectl

  1. Setting up Master Node: Initialize the master node:

sudo kubeadm init --pod-network-cidr=10.244.0.0/16
This CIDR is for Flannel networking; adjust if you're using another CNI.

After initialization, you'll see a kubeadm join command displayed. Save this command, as it will be used to join worker nodes.

Set up the local kubeconfig:

mkdir -p $HOME/.kube sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config sudo chown $(id -u):$(id -g) $HOME/.kube/config Install a Pod network: Using Flannel as an example:


kubectl apply -f https://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel.yml
  1. Setting up Worker Nodes: On each worker node, run the kubeadm join command you saved earlier.

  2. Verify the Cluster: On the master node:


kubectl get nodes

awesome-kubernetes's People

Contributors

sd031 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.