Oneinfra: Kubernetes as a Service Platform

栏目: IT技术 · 发布时间: 5年前

内容简介:You can
Go Report Travis CircleCI Azure Test Azure Release License

oneinfra

oneinfra is a Kubernetes as a Service platform. It empowers you to provide or consume Kubernetes clusters at scale, on any platform or service provider. You decide.

Oneinfra: Kubernetes as a Service Platform

You can read more about its design here .

Managed Kubernetes versions

Kubernetes version Deployable with Default in
1.15.11 20.04.0-alpha1
1.16.8 20.04.0-alpha1
1.17.4 20.04.0-alpha1
1.18.0 20.04.0-alpha1 20.04.0-alpha1
1.19.0-alpha.1 20.04.0-alpha1

Go install

Build has been tested with go versions 1.13 and 1.14.

$ GO111MODULE=on go get github.com/oneinfra/oneinfra/...@master

This should have installed the following binaries:

  • oi-local-cluster : allows you to test oneinfra locally in your machine, creating Docker containers as hypervisors.

  • oi : CLI tool that allows you to test oneinfra locally in a standalone way, without requiring Kubernetes to store manifests.

  • oi-manager : Kubernetes set of controllers that reconcile defined clusters.

Quick start

For the quick start you can either leverage Kubernetes as a management cluster, or you can go with the standalone approach if you don't want to use Kubernetes.

  • With Kubernetes as a management cluster
  • Without Kubernetes (for testing purposes only)

You can also read documentation on how to define clusters once you have set up oneinfra .

With Kubernetes as a management cluster

  • Requirements
    • A Kubernetes cluster that will be the management cluster
    • The management cluster needs to reach the hypervisors you create
    • Docker, for creating fake local hypervisors

Install kind . If you already have a Kubernetes cluster you can use, you can skip this step.

$ kind create cluster

Deploy cert-manager and oneinfra .

$ kubectl apply --validate=false -f https://github.com/jetstack/cert-manager/releases/download/v0.14.1/cert-manager.yaml
$ kubectl wait --for=condition=Available deployment --timeout=2m -n cert-manager --all
$ kubectl apply -f https://raw.githubusercontent.com/oneinfra/oneinfra/master/config/generated/all.yaml

Create a local set of fake hypervisors, so oneinfra can schedule cluster control plane components somewhere. You can also define your own set of hypervisors if you prefer.

$ oi-local-cluster cluster create --remote | kubectl apply -f -

Now, create a managed cluster:

$ kubectl apply -f https://raw.githubusercontent.com/oneinfra/oneinfra/master/config/samples/simple-cluster.yaml
$ kubectl wait --for=condition=ReconcileSucceeded --timeout=2m cluster simple-cluster
$ kubectl get cluster simple-cluster -o yaml | oi cluster admin-kubeconfig > simple-cluster.conf

And access it:

$ kubectl --kubeconfig=simple-cluster.conf cluster-info
Kubernetes master is running at https://172.17.0.5:30000

Without Kubernetes (for testing purposes only)

  • Requirements
    • Docker

If you don't want to deploy Kubernetes to test oneinfra , you can try the oi CLI tool that will allow you to test the reconciliation processes of oneinfra without the need of a Kubernetes cluster.

$ mkdir ~/.kube
$ oi-local-cluster cluster create | \
    oi cluster inject --name simple-cluster | \
    oi component inject --name controlplane1 --role control-plane | \
    oi component inject --name controlplane2 --role control-plane | \
    oi component inject --name controlplane3 --role control-plane | \
    oi component inject --name loadbalancer --role control-plane-ingress | \
    oi reconcile | \
    tee simple-cluster.conf |  # so you can inspect the simple-cluster.conf afterwards :-) \
    oi cluster admin-kubeconfig > ~/.kube/config

And access it:

$ kubectl cluster-info
Kubernetes master is running at https://172.17.0.4:30000

In this mode it's very important to understand that oi will read manifests from stdin and output them into stdout , make sure you keep a file up to date with the latest reconciled resources -- this is why this model is not suitable for production.

Joining worker nodes to a cluster

You can read more details about the worker joining process here .

License

oneinfra is licensed under the terms of the Apache 2.0 license.

Copyright (C) 2020 Rafael Fernández López <ereslibre@ereslibre.es>

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

以上就是本文的全部内容,希望本文的内容对大家的学习或者工作能带来一定的帮助,也希望大家多多支持 码农网

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

深入理解计算机系统(原书第3版)

深入理解计算机系统(原书第3版)

Randal E.Bryant、David O'Hallaron / 龚奕利、贺莲 / 机械工业出版社 / 2016-11 / 139.00元

和第2版相比,本版内容上*大的变化是,从以IA32和x86-64为基础转变为完全以x86-64为基础。主要更新如下: 基于x86-64,大量地重写代码,首次介绍对处理浮点数据的程序的机器级支持。 处理器体系结构修改为支持64位字和操作的设计。 引入更多的功能单元和更复杂的控制逻辑,使基于程序数据流表示的程序性能模型预测更加可靠。 扩充关于用GOT和PLT创建与位置无关代码的......一起来看看 《深入理解计算机系统(原书第3版)》 这本书的介绍吧!

JS 压缩/解压工具
JS 压缩/解压工具

在线压缩/解压 JS 代码

CSS 压缩/解压工具
CSS 压缩/解压工具

在线压缩/解压 CSS 代码

UNIX 时间戳转换
UNIX 时间戳转换

UNIX 时间戳转换