Benutzer-Werkzeuge

Webseiten-Werkzeuge


it-wiki:kubernetes:change_calico_ip_pool

Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen angezeigt.

Link zu dieser Vergleichsansicht

Beide Seiten der vorigen RevisionVorhergehende Überarbeitung
Nächste Überarbeitung
Vorhergehende Überarbeitung
it-wiki:kubernetes:change_calico_ip_pool [2023/08/12 09:07] – [Step 3: Delete pods from the old IP pool] markoit-wiki:kubernetes:change_calico_ip_pool [2024/03/13 12:09] (aktuell) marko
Zeile 55: Zeile 55:
 If you follow these steps, existing pod connectivity will not be affected. (If you delete the old IP pool before you create and verify the new pool, existing pods will be affected.) When pods are deleted, applications may be temporarily unavailable (depending on the type of application); plan accordingly. If you follow these steps, existing pod connectivity will not be affected. (If you delete the old IP pool before you create and verify the new pool, existing pods will be affected.) When pods are deleted, applications may be temporarily unavailable (depending on the type of application); plan accordingly.
  
-  - Add a new IP pool. +  - Add a new IP pool.\\ It is highly recommended that your Calico IP pools are within the Kubernetes cluster CIDR. If pods IPs are allocated from outside of the Kubernetes cluster CIDR, some traffic flows may have NAT applied unnecessarily causing unexpected behavior.\\ 
- +  - Disable the old IP pool.\\ Disabling an IP pool only prevents new IP address allocations; it does not affect the networking of existing pods.\\ 
-It is highly recommended that your Calico IP pools are within the Kubernetes cluster CIDR. If pods IPs are allocated from outside of the Kubernetes cluster CIDR, some traffic flows may have NAT applied unnecessarily causing unexpected behavior. +  - Delete pods from the old IP pool. This includes any new pods that may have been created with the old IP pool prior to disabling the pool.\\ 
- +  - Verify that new pods get an address from the new IP pool.\\
-  - Disable the old IP pool. +
- +
-Disabling an IP pool only prevents new IP address allocations; it does not affect the networking of existing pods. +
- +
-  - Delete pods from the old IP pool. This includes any new pods that may have been created with the old IP pool prior to disabling the pool. +
- +
-  - Verify that new pods get an address from the new IP pool. +
   - Delete the old IP pool.   - Delete the old IP pool.
  
Zeile 87: Zeile 79:
 ==== Step 1: Add a new IP pool ==== ==== Step 1: Add a new IP pool ====
 We add a new **IPPool** with the CIDR range, **10.0.0.0/16**. We add a new **IPPool** with the CIDR range, **10.0.0.0/16**.
-<code bash>+<code yaml>
     apiVersion: projectcalico.org/v3     apiVersion: projectcalico.org/v3
     kind: IPPool     kind: IPPool
Zeile 115: Zeile 107:
 </code> </code>
  
-<code bash>+<code yaml>
     apiVersion: projectcalico.org/v3     apiVersion: projectcalico.org/v3
     items:     items:
Zeile 140: Zeile 132:
 Disable this IP pool by setting: ''disabled: true'' Disable this IP pool by setting: ''disabled: true''
  
-<code bash>+<code yaml>
     apiVersion: projectcalico.org/v3     apiVersion: projectcalico.org/v3
     kind: IPPool     kind: IPPool
Zeile 175: Zeile 167:
  
 ==== Step 4: Verify that new pods get an address from the new IP pool ==== ==== Step 4: Verify that new pods get an address from the new IP pool ====
-  - Create a test namespace and nginx pod. +  - Create a test namespace and nginx pod. <code bash>kubectl create ns ippool-test</code> 
-    - <code bash>kubectl create ns ippool-test</code> +  - Create an nginx pod. <code bash>kubectl -n ippool-test create deployment nginx --image nginx</code> 
-  - Create an nginx pod. +  - Verify that the new pod gets an IP address from the new range. <code bash>kubectl -n ippool-test get pods -l app=nginx -o wide</code> 
-    - <code bash>kubectl -n ippool-test create deployment nginx --image nginx</code> +  - Clean up the ippool-test namespace. <code bash>kubectl delete ns ippool-test</code>
-  - Verify that the new pod gets an IP address from the new range. +
-    - <code bash>kubectl -n ippool-test get pods -l app=nginx -o wide</code> +
-  - Clean up the ippool-test namespace. +
-    - <code bash>kubectl delete ns ippool-test</code>+
  
 ==== Step 5: Delete the old IP pool ==== ==== Step 5: Delete the old IP pool ====
it-wiki/kubernetes/change_calico_ip_pool.1691831233.txt.gz · Zuletzt geändert: 2023/08/12 09:07 von marko