项目作者: guilhem

项目描述 :
Kubernetes IN Kubernetes (yo). kubernetes-operator
高级语言: Go
项目地址: git://github.com/guilhem/kinky.git
创建时间: 2017-12-14T19:56:40Z
项目社区:https://github.com/guilhem/kinky

开源协议:Apache License 2.0

下载


KINKy

Kubernetes IN Kubernetes yo

YO DAWG, WE HEARD YOU LIKE KUBERNETES; SO WE PUT A KUBERNETES IN YO KUBERNETES

Status: alpha

Concept

Spawning (a lot of) Kubernetes clusters via Kubernetes API.

Goal

After putting a kinky object in a k8s cluster. A new fully working k8s API should be spawned.
It should be accessed as a an internal service and with an ingress.

Security is not an option.

Why?

Features & Roadmap

Usage

Create a new cluster via Kinky object like:

  1. apiVersion: kinky.barpilot.github.com/v1alpha1
  2. kind: Kinky
  3. metadata:
  4. namespace: my-team
  5. name: my-kinky

Get a Token for kubelet to join.

On any worker server:

  1. kubeadm join --token <token> my-kinky.my-team.example.com

Install

Prerequisites

etcd-operator

etcd-operator is used to manage etcd clusters for spawned k8s.

For the moment, you have to use a patched version of etcd-operator.
A docker version is available: guilhem/etcd-operator

A deployment can be used: /artifacts/deployment.yaml

k8sniff

k8sniff manage access to your spawned k8s.

To work you have to spawn this service and make it listen for external requests.

Requests will be forward to k8s server baser on “HOST” used by client.

Register CRD

First register the custom resource definition:

  1. kubectl apply -f artifacts/kinkies-crd.yaml

Add Kinky object

An example of the Kinky kind:

  1. kubectl apply -f artifacts/my-kinky.yaml

Run operator

Finally build and run the example:

  1. go build
  2. ./kinky -kubeconfig ~/.kube/config