项目作者: mJace

项目描述 :
ITRI's Kubernetes platform for 5G Edge VNF.
高级语言: Python
项目地址: git://github.com/mJace/x-k8s.git
创建时间: 2019-02-14T08:59:39Z
项目社区:https://github.com/mJace/x-k8s

开源协议:Apache License 2.0

下载


X-K8S - ITRI’s Kubernetes platform for 5G Edge VNF


This project is now moved to

https://github.com/ITRI-ICL-Peregrine/x-k8s

Please check there for the latest release/version.

X-K8S leverages plugins for the better NFV performance in 5G use senario, like CMK (Cpu Manager for Kubernetes),
NFD (Node Feature Discovery), intel’s userspace-cni-network-plugin, etc.
And based on the kubespray v2.8.0 as its deploy tool.

For the detail deploy instruction, check the kubespray’s readme.

Spec

Package version
Kubernetes v1.12.3
Docker v18.06.1-ce
CMK v1.3.1
NFD v0.3.0
Multus v3.2
Flannel v0.10.0
Flannel-CNI v0.3.0
SRIOV-CNI v1.0.0
SRIOV-Device Plugin v2.0

Deploy Node Requirement

  1. Python3
  2. pip3

Master/Minion Node Requirement

Package version
Supported Os Ubuntu 18.04 LTS Server

Usage

1. Prepare your Cluster Node.

  1. Disable and delete swap on all of your nodes.
  2. If you want to enable sriov support on your kubernetes cluster.
    a. Create VF on all of your nodes.
    b. Create /etc/pcidp/config.json on each node base on your SRIOV NIC bus address.
    You can use lshw -class network -businfo to check the bus address of root device.
    For example, your config.json should look like…
  1. {
  2. "resourceList":
  3. [
  4. {
  5. "resourceName": "sriov_net_A",
  6. "rootDevices": ["02:00.0", "02:00.2"],
  7. "sriovMode": true,
  8. "deviceType": "netdevice"
  9. },
  10. {
  11. "resourceName": "sriov_net_B",
  12. "rootDevices": ["02:00.1", "02:00.3"],
  13. "sriovMode": true,
  14. "deviceType": "vfio"
  15. }
  16. ]
  17. }

Go check SRIOV manual for more information.

  1. Enable root account and allow root remote login for each node.
  2. Set password free login for root of deploy node on each node
    1. # at root of deploy node
    2. ssh-copy-id <node1_ip>

2. Install x-k8s

On Deploy Node

  1. Install requirement.

    1. cd x-k8s
    2. sudo pip3 install -r requirements.txt
  2. Edit hosts.ini in /x-k8s/kubespray/inventory/mycluster/hosts.ini

  3. Edit /x-k8s/kubespray/extraVars.yml
    ```yaml=

Helm deployment

helm_enabled: true

Multus deployment

kube_network_plugin: flannel
kube_network_plugin_multus: true

SRIOV Support

Only set to true when you know what you are doing.

sriov_enabled : false

Enable basic auth

kube_basic_auth: true

User defined api password

kube_api_pwd: xk8suser

Change default NodePort range

kube_apiserver_node_port_range: “9000-32767”

  1. 4. Deploy
  2. ```=bash
  3. su -
  4. ./x-k8s install

CLI

  1. X-K8S Installer
  2. Usage:
  3. ./x-k8s install [--i=<hosts>]
  4. ./x-k8s reset [--i=<hosts>]
  5. ./x-k8s list inventory [--vars]
  6. ./x-k8s ( -h | --help)
  7. ./x-k8s ( -v | --version)
  8. Examples:
  9. ./x-k8s install Install x-k8s.
  10. ./x-k8s install --i kubespray/inventory/custom/hosts.ini
  11. Install x-k8s using custom inventory.
  12. ./x-k8s reset Reset host environment listed in inventory.
  13. ./x-k8s reset --i kubespray/inventory/custom/hosts.ini
  14. Reset host environment using custom inventory.
  15. ./x-k8s list inventory List hosts inventory.
  16. ./x-k8s list inventory --vars List hosts inventory with all variables.
  17. ./x-k8s -h
  18. ./x-k8s --help
  19. ./x-k8s -v
  20. ./x-k8s --version
  21. Options:
  22. -h, --help Show this message.
  23. -v, --version Show version.
  24. --vars List hosts inventor with all variables.
  25. --i=<hosts> Path to custom inventory hosts.ini