Skip to content

Commit 7b36558

Browse files
committed
doc: Add setup guide
1 parent d94592c commit 7b36558

File tree

1 file changed

+83
-0
lines changed

1 file changed

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

0 commit comments

Comments
 (0)