Skip to content

mneverov/node-ipam-controller

 
 

Repository files navigation

node-ipam-controller

Out of tree implementation of https://github.com/kubernetes/enhancements/tree/master/keps/sig-network/2593-multiple-cluster-cidrs

It allows users to use an ipam-controller that allocates IP ranges to Nodes, setting the node.spec.PodCIDRs fields. The ipam-controller is configured via CRDs

Build

To build the binary for node-ipam-controller:

make build

To build the Docker image for node-ipam-controller:

make docker-build

Run

Create a Kind cluster with disabled Node CIDRs allocation:

kind create cluster --config hack/test/kind/kind-cfg.yaml

Install ClusterCIDR CRD and configure node-ipam-controller to use dual mode (See the examples folder for more examples):

kubectl create -f charts/node-ipam-controller/gen/crds/networking.x-k8s.io_clustercidrs.yaml
kubectl create -f examples/clustercidr-dual.yaml

Run the controller outside the cluster by specifying Kind cluster kubeconfig:

./bin/manager --kubeconfig="$HOME"/.kube/config

To run the controller inside the cluster, a Docker image must first be loaded into a registry accessible within the Kind cluster.

docker build -t ghcr.io/sigs.k8s.io/node-ipam-controller:local -f Dockerfile .
docker save --output node-ipam-controller.tar ghcr.io/sigs.k8s.io/node-ipam-controller:local
kind load docker-image ghcr.io/sigs.k8s.io/node-ipam-controller:local

Check Kind documentation on how to use local container image registry.

Install node-ipam-controller in the cluster via helm:

helm install node-ipam-controller ./charts/node-ipam-controller --create-namespace --namespace nodeipam --set image.tag=local

Releases

No releases published

Packages

No packages published

Languages

  • Go 93.7%
  • Shell 2.8%
  • Makefile 2.3%
  • Other 1.2%