Git Product home page Git Product logo

simplekube's Introduction

THIS PROJECT IS DEPRECATED

I deprecated it because I can't maintain Kubernetes updates (and test them all). Currently I am focused on maintaining https://github.com/valentin2105/Kubernetes-Saltstack which allows the creation of a single node cluster, too. Using Saltstack is more generally flexible, and also allows the creation of a production cluster.

Other tools like Simplekube: Minikube, k9s, microk8s, etc. - these all focus on simple node installation.


Simple as a shell script. It allow you to deploy easily k8s for tests or learn purposes.

With Simplekube, you can install Kubernetes on Linux servers without have to plug with any cloud provider.

Just take a Linux empty box, clone the git repo, launch the script and have fun with k8s ! It come with few things like Kube-DNS, Calico, Helm, Firewall and IPv6 !

If you need, you can easily add new workers (from multi-clouds) !

How-to use it ?

1- Tweak the head of install_k8s.sh

# please change this value :
hostIP="__PUBLIC_OR_PRIVATE_IPV4__"
# -----------------------
k8sVersion="v1.8.1"
etcdVersion="v3.2.9"
dockerVersion="17.05.0-ce"
cniVersion="v0.6.0"
calicoCNIVersion="v1.11.0"
calicoctlVersion="v1.6.1"
cfsslVersion="v1.2.0"
helmVersion="v2.6.2"

2- Launch the script as user (with sudo power)

./install_k8s.sh --master

3- You can now play with k8s (...)

$- kubectl get cs 
NAME                 STATUS    MESSAGE              ERROR
controller-manager   Healthy   ok
scheduler            Healthy   ok
etcd-0               Healthy   {"health": "true"}

$- kubectl get pod --all-namespaces
NAMESPACE     NAME                                        READY     STATUS    RESTARTS   AGE
kube-system   calico-policy-controller-4180354049-63p5v   1/1       Running   0          4m
kube-system   kube-dns-1822236363-zzkdq                   4/4       Running   0          4m
kube-system   kubernetes-dashboard-3313488171-lff6h       1/1       Running   0          4m
kube-system   tiller-deploy-1884622320-0glqq              1/1       Running   0          4m

$- calicoctl get ippool
CIDR
192.168.0.0/16
fd80:24e2:f998:72d6::/64

$- kubectl run -i -t alpine --image=alpine --restart=Never
/ # ping6 google.com
PING google.com (2404:6800:4003:80d::200e): 56 data bytes
64 bytes from 2404:6800:4003:80d::200e: seq=0 ttl=57 time=2.129 ms

4- Cluster's integrated components :

  • KubeDNS
  • HELM ready
  • KubeDashboard
  • RBAC only by default
  • Calico CNI plugin
  • Calico Policy controller
  • Calicoctl tool
  • UFW to secure access (can be disabled)
  • ECDSA cluster certs w/ CFSSL
  • IPv4/IPv6

5- Expose services :

You can expose easily your services with :

  • Only reachable on the machine : ClusterIP
  • Expose on high TCP ports : NodePort
  • Expose publicly : Service's ExternalIPs

6- Add new nodes :

You can easily add new nodes to your cluster by launching ./install_new_worker.sh

Before launch the script, be sure to tweak the head of the script :

nodeIP="__PUBLIC_OR_PRIVATE_IPV4__"
sshUser="root"
setupFirewall="True"
CAcountry="US"

Requirements

This script download each k8s components with wget and launch k8s with systemd units.

You will need socat, conntrack, sudo and git on your servers.

To add a node, you will need to setup key-based SSH authentification between master & workers.

If you want IPv6 on pods side, you need working IPv6 on hosts.

Simplekube is tested on Debian 8/9 and Ubuntu 16.x/17.x.

Feel free to open an Issue if you need assistance !

simplekube's People

Contributors

valentin2105 avatar stanleezheng avatar tdensmore avatar

Stargazers

linkxzhou avatar Sharan avatar Jenny Li avatar Frank Perrakis avatar cbluth avatar  avatar linehrr avatar Frank Perrakis avatar hélìbīn avatar Joubert RedRat avatar kubernetes for me avatar Dmitry Romanenko avatar Matt Hite avatar phynias avatar Boris Bogdan avatar David Pérez Carmona avatar winfredchen avatar m2nlight avatar lnh avatar Fang Xin Miao avatar  avatar carles san agustin avatar  avatar  avatar Sylvain Rio avatar Salvador Guzman avatar Robert Lidberg avatar Manjunatha Shetty H avatar 0x457 avatar echo-layker avatar Ruibin avatar Jerry avatar Eldio Santos Junior avatar Achton Smidt Winther avatar Makoto Watanabe avatar Ike Devolder avatar Abhas Abhinav avatar Dave Neeley avatar  avatar Adrian van Dongen avatar Liam Mac Gillavry avatar Sascha avatar Francesco Ciocchetti avatar ik5 avatar Oz Tiram avatar johackim avatar Henrik René Høegh avatar  avatar Denis Denisov avatar recall704 avatar  avatar R. Mathieu Landvreugd avatar François Samin avatar Juan Carlos Christensen avatar  avatar Valentin P avatar Aaron A. Glenn avatar Frederic Alix avatar Michael Jett avatar nizq avatar Mish Ushakov avatar Alexey Badenkov avatar Daniele Polencic avatar Yassel Avila avatar Kazuki Suda avatar Gustavo Henrique avatar Martin Linkhorst avatar Aaron Wang avatar curtis avatar Adam Patterson avatar Ewout van Mansom avatar Henk avatar Maciej Sawicki avatar Shubhang Mani avatar Tasdik Rahman avatar Dan (Turk) Osborne avatar Samuel Brown avatar Eike Bernhardt avatar Joël Thieffry avatar Nicolas Aupetit avatar Maxence Maireaux avatar Ricky Lindenhovius avatar Chad Moon avatar João Maia avatar Ross Lonstein avatar Nikolaus Schlemm avatar Madhu Akula avatar JR Camou avatar Damien Goujard avatar Roelof Kallenkoot avatar Tobias Bradtke avatar  avatar jamroks avatar Snoby avatar Raul Martinez Jr avatar

Watchers

Eldio Santos Junior avatar Ross Lonstein avatar jamroks avatar Raul Martinez Jr avatar James Cloos avatar  avatar Frederic Alix avatar  avatar  avatar

simplekube's Issues

Remove the cluster

Hi!!
After I install with install_k8s.sh some machine, how could I remove the cluster?

Help with tweaking the header

Hi Valentin,
I get the following error after running ./install_k8s.sh: "The connection to the server 127.0.0.1:8443 was refused - did you specify the right host or port?"
Actually i also used the ip address of the VM i'm running the script on but no success.
Well FYI, i'm running an ubuntu box with vitualbox from my windows7 machine. Wondering if this could actually pose a problem!
Could you specify if the value for the hostPI should be the VMs IP Address? I set this parameter to: hostIP="VMs_IPadress:8443"
Looking forward to your response...
Many thanks by the way, for a gr8 job you did here!

How to access k8s cluster?

kubectl get nodes
error: yaml: line 2: mapping values are not allowed in this context
check ~/.kube/ , there is no config file.

as your README, "kubectl get cs" after installation. Where to set kubectl config?

Single node ok?

So i built a new Ubuntu 16.04 server, vanilla machine... set a fixed IP for it, updated the install_k8s.sh to reflect the IP and then ran sudo ./install_k8s.sh --master and let the install finish. Got the cluster is up and running, but all 3 kube-system pods remain "pending" and when i inspect them, says "no resources for to schedule".

So i did a kubectl get cs and see all three services as Healthy.

What am i doing wrong?

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.