Skip to content

Commit 1ff50ed

Browse files
committed
doc: Add setup guide
1 parent ab0effa commit 1ff50ed

File tree

1 file changed

+90
-0
lines changed

1 file changed

+90
-0
lines changed
Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
# Swiftv2 Cilium Setup Guide
2+
3+
## Steps
4+
### Clone repo + checkout branch for *.yamls
5+
```
6+
git clone https://github.com/Azure/azure-container-networking.git
7+
git checkout jpayne3506/conflist-generation < TODO Change before merge >
8+
```
9+
10+
### Apply cilium config
11+
```
12+
export DIR=1.17
13+
export CILIUM_VERSION_TAG=v1.17.7-250927
14+
export CILIUM_IMAGE_REGISTRY=mcr.microsoft.com/containernetworking
15+
kubectl apply -f test/integration/manifests/cilium/v${DIR}/cilium-config/cilium-chained-config.yaml
16+
```
17+
18+
- Remove `kube-proxy-replacement-healthz-bind-address: "0.0.0.0:10256"` from configmap if kube-proxy is current on nodes
19+
20+
### Apply cilium Agent + Operator
21+
```
22+
kubectl apply -f test/integration/manifests/cilium/v${DIR}/cilium-operator/files
23+
kubectl apply -f test/integration/manifests/cilium/v${DIR}/cilium-agent/files
24+
```
25+
26+
### Apply/Edit CNS configmap
27+
```
28+
kubectl apply -f test/integration/manifests/cnsconfig/azcnichainedciliumconfigmap.yaml
29+
```
30+
#### Must have configmap values
31+
```
32+
"ProgramSNATIPTables": false
33+
"CNIConflistScenario": "azurecni-chained-cilium"
34+
"CNIConflistFilepath": "/etc/cni/net.d/05-azure-chained-cilium.conflist"
35+
```
36+
37+
### Update CNS image
38+
Leverage a cns build from branch or use `acnpublic.azurecr.io/azure-cns:v1.7.5-2-g94c36c070` < TODO Change before merge >
39+
- This will install our chained conflist through the use of `"CNIConflistScenario": "azurecni-chained-cilium"` and it will be installed on the node here `"CNIConflistFilepath": "/etc/cni/net.d/05-azure-chained-cilium.conflist"`
40+
41+
> NOTE: if your current conflist file name starts with `05` then change our previous filename to one with higher priority to ensure that it is consumed on restart. I.e. `03-azure-chained-cilium.conflist`
42+
43+
### If kube-proxy was present
44+
#### Remove kube-proxy
45+
> NOTE: Reapply `kube-proxy-replacement-healthz-bind-address: "0.0.0.0:10256"` to cilium configmap if previously removed
46+
47+
This can be done either by editing the node-selectors or deleting the ds. Both work...
48+
49+
#### Restart Cilium
50+
kubectl rollout restart ds -n kube-system cilium
51+
52+
53+
### Quick Summary
54+
- Apply/Edit Cilium Config with
55+
- `cni-chaining-mode: generic-veth`
56+
- remove `kube-proxy-replacement-healthz-bind-address`
57+
- You do not need to remove if node does not have kube-proxy enabled
58+
- If applied before agent is in ready state then no need to restart agent
59+
- Apply Agent + Operator
60+
- Apply/Edit CNS config with
61+
- "ProgramSNATIPTables": false
62+
- "CNIConflistScenario": "azurecni-chained-cilium"
63+
- "CNIConflistFilepath": "/etc/cni/net.d/05-azure-chained-cilium.conflist"
64+
- Update CNS image with build from branch or < TODO IMAGE NAME >
65+
- This will install chained conflist
66+
67+
#### If kube-proxy was present
68+
- Reapply `kube-proxy-replacement-healthz-bind-address: "0.0.0.0:10256"` to cilium configmap
69+
- Remove Kube-proxy
70+
- Restart Cilium
71+
72+
73+
## Quick Vaildation testing
74+
- Create pods from deploy
75+
- test/integration/manifests/swiftv2/mt-deploy.yaml
76+
- Creates `container-*` pods on default namespace
77+
- Create Cilium Network Policies
78+
- test/integration/manifests/cilium/netpol/default-allow.yaml
79+
- Will only allow cilium managed endpoints to transmit traffic through default namespace
80+
- Check Cilium Management with
81+
- `kubectl get cep -A`
82+
- `kubectl get cnp -A`
83+
- Check connectivity
84+
- exec -it <container-*> -- sh
85+
- ip a
86+
- look for delegatedNIC IP
87+
- ping <IP>
88+
- confirm CNP working by attempting to ping coredns pods
89+
- should fail if both are being maintained by cilium
90+
- confirm with `kubectl get cep -A`

0 commit comments

Comments
 (0)