Created
March 26, 2021 07:56
-
-
Save ferdinandosimonetti/5dc6ed178eb54973638199c132619845 to your computer and use it in GitHub Desktop.
Using K3D to simulate a K8S cluster with Calico
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
apiVersion: operator.tigera.io/v1 | |
kind: Installation | |
metadata: | |
name: default | |
spec: | |
# Configures Calico networking. | |
calicoNetwork: | |
# Note: The ipPools section cannot be modified post-install. | |
ipPools: | |
- blockSize: 26 | |
cidr: 10.42.0.0/16 | |
encapsulation: VXLANCrossSubnet | |
natOutgoing: Enabled | |
nodeSelector: all() |
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
k3d cluster create prova --port 80:80@loadbalancer --port 443:443@loadbalancer --port 31000:31000@loadbalancer --port 31001:31001@loadbalancer --port 31010:31010@loadbalancer --port 31011:31011@loadbalancer --image rancher/k3s:v1.19.7-k3s1 --api-port 6443 --k3s-server-arg='--flannel-backend=none' --k3s-server-arg='--disable-network-policy' --k3s-server-arg='--disable=traefik' --k3s-server-arg='--cluster-cidr=10.42.0.0/16' --k3s-server-arg='--service-cidr=10.43.0.0/16' | |
kubectl create -f https://docs.projectcalico.org/manifests/tigera-operator.yaml | |
kubectl create -f calico-resources.yml |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment