On-Prem k8s | Part 9

Configuring Networking

Weave

We will use weave version 2.3.0 as our network overlay.

It is really easy to install as a Kubernetes Addon and does not require additional configuration.

Here is the basic command from the Weave documentation:

kubectl apply -f "https://cloud.weave.works/k8s/net?k8s-version=$(kubectl version | base64 | tr -d '\n')"

We need to customize the default configuration to reflect our custom POD_CIDR network (10.16.0.0/16). We can customize the yaml manifest by passing the IPALLOC_RANGE option to the HTTP get:

kubectl apply -f "https://cloud.weave.works/k8s/net?k8s-version=$(kubectl version | base64 | tr -d '\n')&env.IPALLOC_RANGE=10.16.0.0/16"

Output:

serviceaccount "weave-net" created
clusterrole.rbac.authorization.k8s.io "weave-net" created
clusterrolebinding.rbac.authorization.k8s.io "weave-net" created
role.rbac.authorization.k8s.io "weave-net" created
rolebinding.rbac.authorization.k8s.io "weave-net" created
daemonset.extensions "weave-net" created

If you prefer checking the yaml manifest before applying to Kubernetes, just wget the above url.

Checks

Verify pods are up and running:

kubectl get pod --namespace=kube-system -l name=weave-net

Output:

NAME              READY     STATUS    RESTARTS   AGE
weave-net-fwvsr   2/2       Running   1          4h
weave-net-v9z9n   2/2       Running   1          4h
weave-net-zfghq   2/2       Running   1          4h

All nodes should now be in state Ready

Next: Deploying Cluster Add-ons >

< Previous: Generating kubectl config

  • Category
comments powered by Disqus