0
0
Kubernetesdevops~10 mins

Container Network Interface (CNI) in Kubernetes - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to specify the CNI plugin in a Kubernetes pod network configuration.

Kubernetes
cniVersion: "0.3.1"
name: my-network
plugins:
  - type: [1]
Drag options to blanks, or click blank then click option'
Abridge
Bdocker
Chost
Dproxy
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'docker' which is not a CNI plugin type
Using 'host' which is a network mode, not a plugin type
2fill in blank
medium

Complete the code to assign IP addresses dynamically using the CNI IPAM plugin.

Kubernetes
{
  "cniVersion": "0.3.1",
  "name": "my-network",
  "plugins": [
    {
      "type": "bridge",
      "ipam": {
        "type": [1]
      }
    }
  ]
}
Drag options to blanks, or click blank then click option'
Ahost-local
Bdhcp
Cstatic
Dmanual
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'static' which requires manual IP assignment
Using 'dhcp' which is not commonly used in Kubernetes CNI
3fill in blank
hard

Fix the error in the CNI configuration by completing the missing field for the bridge name.

Kubernetes
{
  "cniVersion": "0.3.1",
  "name": "my-network",
  "plugins": [
    {
      "type": "bridge",
      "bridge": [1],
      "ipam": {
        "type": "host-local"
      }
    }
  ]
}
Drag options to blanks, or click blank then click option'
Aeth0
Bcni0
C"eth0"
D"cni0"
Attempts:
3 left
💡 Hint
Common Mistakes
Omitting quotes causing JSON syntax errors
Using interface names like 'eth0' instead of bridge names
4fill in blank
hard

Fill both blanks to configure a CNI plugin with a bridge name and subnet for IPAM.

Kubernetes
{
  "cniVersion": "0.3.1",
  "name": "my-network",
  "plugins": [
    {
      "type": "bridge",
      "bridge": [1],
      "ipam": {
        "type": "host-local",
        "subnet": [2]
      }
    }
  ]
}
Drag options to blanks, or click blank then click option'
A"br0"
B"192.168.1.0/24"
C"10.1.0.0/16"
D"eth1"
Attempts:
3 left
💡 Hint
Common Mistakes
Using interface names instead of bridge names
Providing subnet without quotes causing JSON errors
5fill in blank
hard

Fill all three blanks to create a CNI config with bridge type, IPAM subnet, and gateway.

Kubernetes
{
  "cniVersion": "0.3.1",
  "name": "custom-net",
  "plugins": [
    {
      "type": [1],
      "bridge": [2],
      "ipam": {
        "type": "host-local",
        "subnet": [3],
        "gateway": "192.168.100.1"
      }
    }
  ]
}
Drag options to blanks, or click blank then click option'
A"bridge"
B"br-custom"
C"192.168.100.0/24"
D"eth0"
Attempts:
3 left
💡 Hint
Common Mistakes
Using unquoted strings causing JSON errors
Confusing interface names with bridge names