Giter Site home page Giter Site logo

k8s0's Introduction

k8s0: Kubernetes Ground Zero Build Status

It's a minimal kubernetes installation on a fixed configuration.

This project is like MiniKube or minimal version of Kargo, but with the capability to run on Travis.

So the user can try this on local host or VM, or use it on Travis for kubernetes DevOps. And the ansible script make it easy to tweak the installation steps for more usages.

Another difference from MiniKube is this project use the same image as the full-fledged k8s, no wrapper or any code changes. All source code is ansible script to deploy and configure k8s.

One more thing, all components are installed as containers including etcd, kubelet, calico, ...


Current status: installed etcd, kubelet, api server, controller, scheduler, proxy, and calico as network plugin.

Impediments:


Prerequisites

For now, only support ubuntu >=14.04 with docker and ansible installed.

Usage

Deploy using Vagrant

Use vagrant vagrant up in the source root folder.

Deploy on Travis

Check .travis.yml for more details.

Deploy on localhost

# pull images and put into ./images folder
ansible-playbook -i inventory/local images.yml

# start kubernetes on localhost
ansible-playbook -i inventory/local site.yml

Deploy to a remote host

# change ip to the remote host
https://github.com/reachlin/k8s0/blob/master/inventory/single/inventory

# pull images and put into ./images folder
ansible-playbook -i inventory/single images.yml

# start kubernetes on localhost
ansible-playbook -i inventory/single site.yml

Features

  • Minimal kubernetes on travis for DevOps.

  • Include a local registry or repo, so k8s can be deployed without an internet connection.

  • All k8s components running as containers

Dev. Notes

Basic steps

etcd -> kubelet -> api server as static pod -> other k8s pods -> calico

References

Create certificates

openssl genrsa -out ca.key 2048
openssl req -x509 -new -nodes -key ca.key -subj "/CN=k8s0-ca" -days 99999 -out ca.crt -sha256
openssl x509 -in ca.crt -text -noout
openssl genrsa -out kubelet.key 2048
openssl req -new -key kubelet.key -subj "/CN=kubelet" -out kubelet.csr
openssl x509 -req -in kubelet.csr -CA ca.crt -CAkey ca.key -CAcreateserial -out kubelet.crt -days 99999 -sha256
openssl x509 -in kubelet.crt -text -noout
openssl genrsa -out server.key 2048
openssl req -new -key server.key -subj "/CN=apiserver" -out server.csr
openssl x509 -req -in server.csr -CA ca.crt -CAkey ca.key -CAcreateserial -out server.crt -days 99999 -sha256 -extensions req_ext -extfile openssl.conf
openssl x509 -in server.crt -text -noout

Useful commands

# clean all
docker ps -a --format "{{.ID}}"|xargs -L1 docker rm -f

k8s0's People

Contributors

reachlin avatar

Watchers

Yazz Atlas avatar James Cloos 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.