GithubHelp home page GithubHelp logo

bossjones / kubernetes-vagrant Goto Github PK

View Code? Open in Web Editor NEW

This project forked from therockstardba/kubernetes-vagrant

0.0 0.0 0.0 1.81 MB

License: Apache License 2.0

Smarty 0.30% Python 97.95% Shell 0.93% HCL 0.81%

kubernetes-vagrant's Introduction

Vagrant For K8's

This vagrant script shall install kubernetes cluster on Linux/Windows using vagrant and Virtualbox.

Dependencies

  • Vagrant.require_version >= 2.0.0
  • Virtualbox

VirtualBox

Download virtual box for windows from https://www.virtualbox.org/wiki/Downloads follow the onscreen steps to install

Install Vagrant On windows

Download vagrant from https://www.vagrantup.com/downloads.html

after it's installed completely you can test using the command vagrant in command prompt

we dont need to install ansible as ansible would be automatically be installed on the master node and used to manage other nodes

Vagrant File Parameters

Setup these parameters in vagrant file to select no of node and memory and other specifications

  • $num_instances = 4 ## Number of Instances Vagrant shall create on your Virtual Box ##

  • $instance_name_prefix = "k8s" ## Your VM Names Prefix ##

  • $vm_memory = 3500 ## VM Memory ##

  • $vm_cpus = 3 ## VM CPU Core to be assigned ##

  • $subnet = "172.17.8" ## VM Subnet ##

  • $os = "ubuntu" ## VM Operating System ##

  • $network_plugin = "flannel" ## Kubernetes Network Plugin

  • $etcd_instances = 3 ## Note: etcd instance should not be even number ##

  • $kube_node_instances = $num_instances #it would be same as no of instances or you could edit with your number #

K8's installation using vagrant

cd kubernetes-vagrant
vagrant up 

vagrant status 

Connect to VM

vagrant ssh node_name
VM Role IP Address Box
k8s-01 master 172.17.8.101 bento/ubuntu-16.04
k8s-02 node 172.17.8.102 bento/ubuntu-16.04
k8s-0X node 172.17.8.10X bento/ubuntu-16.04
mssql-jump jump-box 172.17.8.201 bento/ubuntu-16.04

Confirm your installation by running a command ( you need to ssh into the master )

 $ kubectl get nodes
 $ kubectl get pods --all-namespaces

Connect to Dashboard

https://172.17.8.101:30910/#!/login

Generate Key

kubectl -n kube-system describe secrets \
`kubectl -n kube-system get secrets | awk '/clusterrole-aggregation-controller/ {print $1}'` \
| awk '/token:/ {print $2}'

kubernetes-vagrant's People

Contributors

dmitryint avatar stuartshay avatar xmavrck 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.