项目作者: Sh4d1

项目描述 :
A Kubernetes Controller for VPC/Private Network on a Scaleway Kubernetes cluster
高级语言: Go
项目地址: git://github.com/Sh4d1/scaleway-k8s-vpc.git
创建时间: 2020-12-07T09:27:01Z
项目社区:https://github.com/Sh4d1/scaleway-k8s-vpc

开源协议:Other

下载


Scaleway K8S VPC

Note: This in just a Proof of Concept, it is not suited for production usage.

Scaleway K8S VPC is a controller for Kubernetes running on Scaleway, leveraging CRDs to use PrivateNetwork in the cluster.

Getting started

Install the controller and the node daemon with:

  1. kubectl create -k https://github.com/Sh4d1/scaleway-k8s-vpc/config/default

Create and enter your Scaleway credentials with:

  1. kubectl create -f https://raw.githubusercontent.com/Sh4d1/scaleway-k8s-vpc/main/secret.yaml --edit --namespace scaleway-k8s-vpc-system

You can now create the following PrivateNetwork object:

  1. apiVersion: vpc.scaleway.com/v1alpha1
  2. kind: PrivateNetwork
  3. metadata:
  4. name: my-privatenetwork
  5. spec:
  6. id: <private network ID>
  7. ipam:
  8. type: Static
  9. static:
  10. cidr: 192.168.0.0/24
  11. routes:
  12. - to: 1.2.3.4/16
  13. via: 192.168.0.10

This will attach the private network to all nodes in the cluster, set up the interfaces with IPs in the range, and add the routes if needed.

If you have a DHCP running in the private network you can use it to assign IPs:

  1. apiVersion: vpc.scaleway.com/v1alpha1
  2. kind: PrivateNetwork
  3. metadata:
  4. name: my-privatenetwork
  5. spec:
  6. id: <private network ID>
  7. ipam:
  8. type: DHCP
  9. routes:
  10. - to: 1.2.3.4/16
  11. via: 192.168.0.10

Contribution

Feel free to submit any issue, feature request or pull request :smile:!