-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #290 from netgroup-polito/mio/infrastructure
- Loading branch information
Showing
12 changed files
with
228 additions
and
3,054 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
calico.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,17 @@ | ||
## Kubernetes Networking - CNI Setup | ||
# Kubernetes Networking - CNI Setup | ||
|
||
In order to correctly setup the cluster, the [calico.yaml](calico.yaml) configuration file of the CNI have been slightly modified. In particular the pod network CIDR has been configured as shown in the following snippet: | ||
As for it concerns Kubernetes networking, we selected [Project Calico](https://www.projectcalico.org/), since it is one of the most popular CNI plugins. | ||
In short, it limits the overhead by requiring no overlay and supports advanced features such as the definition of network policies to isolate the traffic between different containers. | ||
|
||
```yaml | ||
... | ||
- name: CALICO_IPV4POOL_CIDR | ||
value: "172.16.0.0/16" | ||
... | ||
``` | ||
|
||
Now, apply the [calico.yaml](calico.yaml) file: | ||
## Calico Installation | ||
In order to install Calico, you can perform the following operations, which will download the default configuration from the official webpage and apply it customizing the pod network CIDR according to the selected cluster setup: | ||
|
||
```sh | ||
$ kubectl apply -f calico.yaml | ||
```bash | ||
$ export CALICO_VERSION=v3.16 | ||
$ curl https://docs.projectcalico.org/${CALICO_VERSION}/manifests/calico.yaml -o calico.yaml | ||
$ kubectl apply -k . | ||
``` | ||
|
||
This will setup Calico with the following networking configuration of the cluster: | ||
- IP addresses of pods: 172.16.0.0/16 | ||
- IP addresses of services: 10.96.0.0/12 | ||
|
||
IP addresses of the worker nodes are outside CALICO configuration. | ||
## Selected cluster networking configuration | ||
- IP addresses of pods: 172.16.0.0/16 | ||
- IP addresses of services: 10.96.0.0/12 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
apiVersion: apps/v1 | ||
kind: DaemonSet | ||
metadata: | ||
name: calico-node | ||
namespace: kube-system | ||
spec: | ||
template: | ||
spec: | ||
containers: | ||
- name: calico-node | ||
env: | ||
- name: CALICO_IPV4POOL_CIDR | ||
value: "172.16.0.0/16" |
Oops, something went wrong.