-
Notifications
You must be signed in to change notification settings - Fork 56
Building Calico with Kubernetes
Calico enables networking and network policy in Kubernetes clusters across the cloud. The instructions provided you the steps to integrate Calico with Kubernetes on Linux on IBM Z for following distribution:
- RHEL (7.6, 7.7, 7.8, 8.1, 8.2)
- SLES (12 SP4, 12 SP5, 15 SP1)
- Ubuntu (16.04, 18.04, 20.04)
General Notes:
-
When following the steps below please use a standard permission user unless otherwise specified.
-
A directory
/<source_root>/will be referred to in these instructions, this is a temporary writable directory anywhere you'd like to place it. -
Following build instructions were tested using Kubernetes version 1.18.3
Instructions for building the basic Calico components, which includes calicoctl and calico/node can be found here
-
Export Environment Variable
export PATCH_URL=https://raw.githubusercontent.com/linux-on-ibm-z/scripts/master/Calico/3.14.1/patch -
This builds a docker image
pod2dameonthat will be used when running kubernetes with Calicogit clone -b v3.14.1 https://github.com/projectcalico/pod2daemon.git $GOPATH/src/github.com/projectcalico/pod2daemon cd $GOPATH/src/github.com/projectcalico/pod2daemon
-
Build binaries and image
ARCH=s390x make GO_BUILD_VER=v0.39 image
-
Download the source code
git clone -b v3.14.1 https://github.com/projectcalico/k8s-policy.git $GOPATH/src/github.com/projectcalico/k8s-policy cd $GOPATH/src/github.com/projectcalico/k8s-policy ARCH=s390x make image
The built docker images need to be tagged with the version number to correctly work with kubernetes:
docker tag calico/pod2daemon-flexvol:latest-s390x calico/pod2daemon-flexvol:v3.14.1
docker tag calico/kube-controllers:latest-s390x calico/kube-controllers:v3.14.1
docker tag calico/flannel-migration-controller:latest-s390x calico/calico/flannel-migration-controller:v3.14.1Verify the following images are on the system:
REPOSITORY TAG
quay.io/coreos/etcd v3.3.7-s390x
calico/pod2daemon-flexvol latest-s390x
calico/kube-controllers latest-s390x
calico/flannel-migration-controller latest-s390x
calico/node latest-s390x
calico/cni latest-s390x
calico/felix latest-s390x
calico/typha latest-s390x
calico/ctl latest-s390x
calico/pod2daemon-flexvol v3.14.1
calico/kube-controllers v3.14.1
calico/flannel-migration-controller v3.14.1
calico/node v3.14.1
calico/cni v3.14.1
calico/felix v3.14.1
calico/typha v3.14.1
calico/ctl v3.14.1
calico/go-build v0.39Once you have all necessary components built on Z systems, you can
-
Configure and run your Kubernetes following here
Note: If you run into problems like
Readiness probe failed: Get http://localhost:9099/readiness: dial tcp [::1]:9099: connect: connection refusedwhen running kubernetes, it might be because Calico requires net.ipv4.conf.all.rp_filter to be set to 0 or 1.Try doing
sysctl -w net.ipv4.conf.all.rp_filter=1
and retry creating the pods. See this issue for more information about the error
-
Install the calico policy controller following here
The information provided in this article is accurate at the time of writing, but on-going development in the open-source projects involved may make the information incorrect or obsolete. Please open issue or contact us on IBM Z Community if you have any questions or feedback.