我要评分
获取效率
正确性
完整性
易理解

Node Subnet

According to the Kubernetes network specifications, a node can directly communicate with all pods. To achieve this goal, Kube-OVN creates a join subnet and creates a virtual NIC ovn0 on each node to connect to the join subnet. Hosts can communicate with pods through the subnet.

You can change the configuration of the node subnet during the installation. For details, see Configuring the Built-in Subnets.

  • Run the following command to view the node subnet:
    1
    kubectl get subnet join -o yaml
    
     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
    apiVersion: kubeovn.io/v1
    kind: Subnet
    metadata:
      creationTimestamp: "2020-06-28T06:42:32Z"
      finalizers:
      - kube-ovn-controller
      generation: 2
      name: join
      resourceVersion: "749434"
      selfLink: /apis/kubeovn.io/v1/subnets/join
      uid: 3179fdc6-56a9-4211-a4c2-d922f4463adb
    spec:
      cidrBlock: 100.64.0.0/16
      default: false
      excludeIps:
      - 100.64.0.1
      gateway: 100.64.0.1
      gatewayNode: ""
      gatewayType: distributed
      natOutgoing: false
      private: false
      protocol: IPv4
      provider: ovn
      underlayGateway: false
    status:
      activateGateway: ""
      availableIPs: 65530
      conditions:
      - lastTransitionTime: "2020-06-28T06:42:33Z"
        lastUpdateTime: "2020-06-28T06:42:33Z"
        reason: ResetLogicalSwitchAclSuccess
        status: "True"
        type: Validated
      - lastTransitionTime: "2020-06-28T06:42:33Z"
        lastUpdateTime: "2020-06-28T06:42:33Z"
        reason: ResetLogicalSwitchAclSuccess
        status: "True"
        type: Ready
      - lastTransitionTime: "2020-06-28T06:42:33Z"
        lastUpdateTime: "2020-06-28T06:42:33Z"
        message: Not Observed
        reason: Init
        status: Unknown
        type: Error
      usingIPs: 3
    
  • Run the following command on each node to view the ovn0 NIC:
    1
    ifconfig ovn0
    
    1
    2
    3
    4
    5
    6
    7
    8
    ovn0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1400
            inet 100.64.0.2  netmask 255.255.0.0  broadcast 100.64.255.255
            inet6 fe80::200:ff:fec6:936d  prefixlen 64  scopeid 0x20<link>
            ether 00:00:00:c6:93:6d  txqueuelen 1000  (Ethernet)
            RX packets 5673864  bytes 530785977 (506.1 MiB)
            RX errors 0  dropped 0  overruns 0  frame 0
            TX packets 5243874  bytes 8069050878 (7.5 GiB)
            TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0