Code Monkey home page Code Monkey logo

k8s-lab's Introduction

Lightweight Kubernetes Labratory

Twitter Follow GitHub Follow Linkedin Badge Youtube Badge

This is a 3-node-cluster Kubernetes that uses k3s. It can be very usefull for learning Kubernetes concepts easy and fast without struggling with installing kubernetes by kubeadm or minikube. Although learning methods of Kubernetes installation is definitely crucial, for first step and for learning vital and basic concepts of Kubernetes we need a lightweight and repeatable infrastructure.

Requirement

Make sure that following tools are installed on your host.

  1. Ansible
  2. Vagrant
  3. libvirt/KVM or virtualbox

SSH configuration

Add the following configuration in ~/.ssh/config

Host 10.0.0.*
        Hostname %h

Host 192.168.56.*                     
        Hostname %h
                                               
Match Host 10.0.0.*
        User vagrant                 
        Port 22
        UserKnownHostsFile /dev/null     
        StrictHostKeyChecking no
        PasswordAuthentication no
        IdentityFile $HOME/.vagrant.d/insecure_private_key
        IdentitiesOnly yes                                                                     
        LogLevel FATAL          
                                               
Match Host 192.168.56.*
        User vagrant                                                                           
        Port 22                                                                                
        UserKnownHostsFile /dev/null                                                           
        StrictHostKeyChecking no
        PasswordAuthentication no                                                              
        IdentityFile $HOME/.vagrant.d/insecure_private_key
        IdentitiesOnly yes                                                                     
        LogLevel FATAL

How does it work?

Fill the variables in vagrant_variables.yaml and then execute the following command:

vagrant up

Kubeconfig

For executing kubectl from your machine rather than in master node (node-1), copy the kubectl configuration in your machine:

scp vagrant@<node-1-ip>:~/.kube/config ~/.kube/config

Changing default storage pool directory

URL
For changing storage pool default path, the following commands can be used:

virsh pool-list
virsh pool-destroy default
virsh pool-undefine default
virsh pool-define-as --name default --type dir --target /hdd/pool_ssd_nvm
virsh pool-autostart default
virsh pool-start default

k8s-lab's People

Contributors

hamidgholami avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

blueoceandevops

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.