从字面来理解,就是把一个IP数据包又套在一个IP包里,即把 IP 层封装到 IP 层的一个 tunnel。它的作用其实基本上就相当于一个基于IP层的网桥!一般来说,普通的网桥是基于mac层的,根本不需 IP,而这个 ipip 则是通过两端的路由做一个 tunnel,把两个本来不通的网络通过点对点连接起来。
安装calico
[root@master ~]# kubectl create -f https://docs.projectcalico.org/manifests/tigera-operator.yaml [root@master ~]# curl -O https://docs.projectcalico.org/manifests/custom-resources.yaml custom-resources.yaml [root@master ~]# vim custom-resources.yaml # This section includes base Calico installation configuration. # For more information, see: https://docs.projectcalico.org/v3.17/reference/installation/api#operator.tigera.io/v1.Installation 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.244.0.0/16 # 修改cidr encapsulation: VXLANCrossSubnet => IPIP # 修改xvlan为ipip(默认为ipip可以删除这条) natOutgoing: Enabled nodeSelector: all() [root@master ~]# kubectl apply -f custom-resources.yaml [root@master ~]# kubectl get pods -n calico-system NAME READY STATUS RESTARTS AGE calico-kube-controllers-546d44f5b7-6x746 1/1 Running 0 4m2s calico-node-kh6cg 1/1 Running 0 4m2s calico-node-wl2hg 1/1 Running 0 4m2s calico-typha-6848b8fd67-7bpkm 1/1 Running 0 2m29s