1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
| [root@vm172-16-0-202 ~]# docker rm -f xxx # flanneld 容器id [root@vm172-16-0-202 ~]# cat /run/flannel/subnet.env FLANNEL_NETWORK=10.97.0.0/16 FLANNEL_SUBNET=10.97.2.1/24 FLANNEL_MTU=1450 FLANNEL_IPMASQ=true [root@vm172-16-0-202 ~]# docker ps -a | grep flanneld e288c4442ee2 reg.xxx.lan:5000/xxx/flannel "/opt/bin/flanneld -…" 41 seconds ago Up 40 seconds k8s_kube-flannel_kube-flannel-ds-w7rk2_kube-system_581101b1-cfa5-4ccc-80be-e78a9c248b96_1 [root@vm172-16-0-202 ~]# docker logs e288 I0903 01:47:13.123249 1 main.go:211] CLI flags config: {etcdEndpoints:http://127.0.0.1:4001,http://127.0.0.1:2379 etcdPrefix:/coreos.com/network etcdKeyfile: etcdCertfile: etcdCAFile: etcdUsername: etcdPassword: version:false kubeSubnetMgr:true kubeApiUrl: kubeAnnotationPrefix:flannel.alpha.coreos.com kubeConfigFile: iface:[] ifaceRegex:[] ipMasq:true ifaceCanReach: subnetFile:/run/flannel/subnet.env publicIP: publicIPv6: subnetLeaseRenewMargin:60 healthzIP:0.0.0.0 healthzPort:0 iptablesResyncSeconds:5 iptablesForwardRules:true netConfPath:/etc/kube-flannel/net-conf.json setNodeNetworkUnavailable:true} W0903 01:47:13.123387 1 client_config.go:618] Neither --kubeconfig nor --master was specified. Using the inClusterConfig. This might not work. I0903 01:47:13.223377 1 kube.go:139] Waiting 10m0s for node controller to sync I0903 01:47:13.223476 1 kube.go:469] Starting kube subnet manager I0903 01:47:13.230593 1 kube.go:490] Creating the node lease for IPv4. This is the n.Spec.PodCIDRs: [10.97.1.0/24] I0903 01:47:13.230628 1 kube.go:490] Creating the node lease for IPv4. This is the n.Spec.PodCIDRs: [10.97.2.0/24] I0903 01:47:13.230637 1 kube.go:490] Creating the node lease for IPv4. This is the n.Spec.PodCIDRs: [10.97.3.0/24] I0903 01:47:13.230644 1 kube.go:490] Creating the node lease for IPv4. This is the n.Spec.PodCIDRs: [10.97.0.0/24] I0903 01:47:14.223684 1 kube.go:146] Node controller sync successful I0903 01:47:14.223761 1 main.go:231] Created subnet manager: Kubernetes Subnet Manager - 172.16.0.202 I0903 01:47:14.223767 1 main.go:234] Installing signal handlers I0903 01:47:14.224176 1 main.go:452] Found network config - Backend type: vxlan I0903 01:47:14.229346 1 kube.go:669] List of node(172.16.0.202) annotations: map[string]string{"flannel.alpha.coreos.com/backend-data":"null", "flannel.alpha.coreos.com/backend-type":"host-gw", "flannel.alpha.coreos.com/kube-subnet-manager":"true", "flannel.alpha.coreos.com/public-ip":"172.16.0.202", "node.alpha.kubernetes.io/ttl":"0", "volumes.kubernetes.io/controller-managed-attach-detach":"true"} I0903 01:47:14.229398 1 match.go:210] Determining IP address of default interface I0903 01:47:14.229758 1 match.go:263] Using interface with name eth0 and address 172.16.0.202 I0903 01:47:14.229788 1 match.go:285] Defaulting external address to interface address (172.16.0.202) I0903 01:47:14.229841 1 vxlan.go:141] VXLAN config: VNI=1 Port=8475 GBP=false Learning=false DirectRouting=false I0903 01:47:14.233427 1 kube.go:636] List of node(172.16.0.202) annotations: map[string]string{"flannel.alpha.coreos.com/backend-data":"null", "flannel.alpha.coreos.com/backend-type":"host-gw", "flannel.alpha.coreos.com/kube-subnet-manager":"true", "flannel.alpha.coreos.com/public-ip":"172.16.0.202", "node.alpha.kubernetes.io/ttl":"0", "volumes.kubernetes.io/controller-managed-attach-detach":"true"} I0903 01:47:14.249292 1 iptables.go:51] Starting flannel in iptables mode... W0903 01:47:14.249452 1 main.go:540] no subnet found for key: FLANNEL_IPV6_NETWORK in file: /run/flannel/subnet.env W0903 01:47:14.249491 1 main.go:540] no subnet found for key: FLANNEL_IPV6_SUBNET in file: /run/flannel/subnet.env I0903 01:47:14.249498 1 iptables.go:125] Setting up masking rules I0903 01:47:14.250112 1 kube.go:490] Creating the node lease for IPv4. This is the n.Spec.PodCIDRs: [10.97.2.0/24] I0903 01:47:14.529553 1 iptables.go:226] Changing default FORWARD chain policy to ACCEPT I0903 01:47:14.622211 1 main.go:396] Wrote subnet file to /run/flannel/subnet.env I0903 01:47:14.622240 1 main.go:400] Running backend. I0903 01:47:14.622545 1 vxlan_network.go:65] watching for new subnet leases I0903 01:47:14.622590 1 subnet.go:152] Batch elem [0] is { lease.Event{Type:0, Lease:lease.Lease{EnableIPv4:true, EnableIPv6:false, Subnet:ip.IP4Net{IP:0xa610100, PrefixLen:0x18}, IPv6Subnet:ip.IP6Net{IP:(*ip.IP6)(nil), PrefixLen:0x0}, Attrs:lease.LeaseAttrs{PublicIP:0xac100068, PublicIPv6:(*ip.IP6)(nil), BackendType:"host-gw", BackendData:json.RawMessage{0x6e, 0x75, 0x6c, 0x6c}, BackendV6Data:json.RawMessage(nil)}, Expiration:time.Date(1, time.January, 1, 0, 0, 0, 0, time.UTC), Asof:0}} } I0903 01:47:14.622651 1 subnet.go:152] Batch elem [0] is { lease.Event{Type:0, Lease:lease.Lease{EnableIPv4:true, EnableIPv6:false, Subnet:ip.IP4Net{IP:0xa610300, PrefixLen:0x18}, IPv6Subnet:ip.IP6Net{IP:(*ip.IP6)(nil), PrefixLen:0x0}, Attrs:lease.LeaseAttrs{PublicIP:0xac1000e7, PublicIPv6:(*ip.IP6)(nil), BackendType:"host-gw", BackendData:json.RawMessage{0x6e, 0x75, 0x6c, 0x6c}, BackendV6Data:json.RawMessage(nil)}, Expiration:time.Date(1, time.January, 1, 0, 0, 0, 0, time.UTC), Asof:0}} } I0903 01:47:14.622694 1 vxlan_network.go:100] Received Subnet Event with VxLan: BackendType: host-gw, PublicIP: 172.16.0.104, PublicIPv6: (nil), BackendData: null, BackendV6Data: (nil) W0903 01:47:14.622710 1 vxlan_network.go:102] ignoring non-vxlan v4Subnet(10.97.1.0/24) v6Subnet(::/0): type=host-gw I0903 01:47:14.622724 1 vxlan_network.go:100] Received Subnet Event with VxLan: BackendType: host-gw, PublicIP: 172.16.0.231, PublicIPv6: (nil), BackendData: null, BackendV6Data: (nil) W0903 01:47:14.622727 1 vxlan_network.go:102] ignoring non-vxlan v4Subnet(10.97.3.0/24) v6Subnet(::/0): type=host-gw I0903 01:47:14.622737 1 subnet.go:152] Batch elem [0] is { lease.Event{Type:0, Lease:lease.Lease{EnableIPv4:true, EnableIPv6:false, Subnet:ip.IP4Net{IP:0xa610000, PrefixLen:0x18}, IPv6Subnet:ip.IP6Net{IP:(*ip.IP6)(nil), PrefixLen:0x0}, Attrs:lease.LeaseAttrs{PublicIP:0xac1000fa, PublicIPv6:(*ip.IP6)(nil), BackendType:"host-gw", BackendData:json.RawMessage{0x6e, 0x75, 0x6c, 0x6c}, BackendV6Data:json.RawMessage(nil)}, Expiration:time.Date(1, time.January, 1, 0, 0, 0, 0, time.UTC), Asof:0}} } I0903 01:47:14.622759 1 vxlan_network.go:100] Received Subnet Event with VxLan: BackendType: host-gw, PublicIP: 172.16.0.250, PublicIPv6: (nil), BackendData: null, BackendV6Data: (nil) W0903 01:47:14.622764 1 vxlan_network.go:102] ignoring non-vxlan v4Subnet(10.97.0.0/24) v6Subnet(::/0): type=host-gw I0903 01:47:14.722083 1 main.go:421] Waiting for all goroutines to exit I0903 01:47:15.123247 1 iptables.go:372] bootstrap done I0903 01:47:15.525861 1 iptables.go:372] bootstrap done
|