Giter Club home page Giter Club logo

my_kubespray's Introduction

Deploy a Production Ready Kubernetes Cluster

Quick Start

To deploy the cluster you can use :

Usage

Important parameters that have been changed:
    Etcd is installed as systemD not docker.
    Container runtimes: containerd
    Metallb: True
    kube_network_plugin: calico
    kube_proxy_mode: ipvs
    kube_encrypt_secret_data: true
    nodelocaldns_ip: 192.68.8.10

    
Step1) # Install dependencies from ``requirements.txt`` on Ansible server.
          cd /opt
     sudo apt-get install python3-venv
     sudo python3 -m venv venv
     sudo apt install python3-pip
          pip3 install -U pip
          source venv/bin/activate
     sudo git clone https://github.com/DFazeli/my_kubespray.git
          cd my_kubespray
     sudo pip3 install -r requirements.txt
          ssh-keygen
          ssh-copy-id -i your_user@All_kubernetes_cluster_nodes_IP
     sudo vim /etc/resolv.conf
              185.51.200.2
              178.22.122.100

Step2) # Set inventory hosts 
     sudo declare -a IPS=(10.10.1.3 10.10.1.4 10.10.1.5)
     sudo CONFIG_FILE=inventory/newcluster/hosts.yaml python3 contrib/inventory_builder/inventory.py ${IPS[@]}
Or 
     sudo vim inventory/newcluster/inventory.ini

Step3) # If you want Review and change parameters under ``inventory/newcluster/group_vars``
      vim inventory/newcluster/group_vars/all/all.yml
      vim inventory/newcluster/group_vars/k8s_cluster/k8s_cluster.yml

Step4) # Run ansible playbook if your inventory file is [hosts.yaml] 
         ansible-playbook -i inventory/newcluster/hosts.yaml  -b --private-key=~/.ssh/id_rsa  cluster.yml
       OR  
         Run ansible playbook if your inventory file is [inventory.ini] (Do not forget to introduce your nodes)
           ansible-playbook -i inventory/newcluster/inventory.ini  -b --private-key=~/.ssh/id_rsa  cluster.yml

my_kubespray's People

Contributors

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