Welcome to the Linux Foundation Forum!

Ex 4.1

Regarding 4.1, I don't have any cni.log file in my nodes. Is this bad?

Stefan

Comments

  • chrispokorni
    chrispokorni Posts: 2,155
    edited January 2021

    Hi @suser,

    What network plugin do you have installed in your cluster? What is your Kubernetes release version and the OS of your nodes?

    Under Ubuntu 18.04 LTS with Kubernetes 1.19.0 and 1.20.1, and Calico as CNI plugin, logs are saved by default under the path shown in Lab 4.1 Step 1, and this is the log_file_path set in the /etc/cni/net.d/10-calico.conflist CNI configuration file for the Calico plugin.

    Regards,
    -Chris

  • suser
    suser Posts: 67

    Thanks Chris. indeed my env is Ubuntu 18.04 LTS with Kubernetes 1.19.0, and I found the file /etc/cni/net.d/10-calico.conflist but there is no entry log_file_path:

    $ cat /etc/cni/net.d/10-calico.conflist
    {
    "name": "k8s-pod-network",
    "cniVersion": "0.3.1",
    "plugins": [
    {
    "type": "calico",
    "log_level": "info",
    "datastore_type": "kubernetes",
    "nodename": "kmaster",
    "mtu": 1440,
    "ipam": {
    "type": "calico-ipam"
    },
    "policy": {
    "type": "k8s"
    },
    "kubernetes": {
    "kubeconfig": "/etc/cni/net.d/calico-kubeconfig"
    }
    },
    {
    "type": "portmap",
    "snat": true,
    "capabilities": {"portMappings": true}
    }
    ]
    }

    This means my system is missing some plugin?

    Thanks again!

    Stefan

  • chrispokorni
    chrispokorni Posts: 2,155
    edited January 2021

    Hi @suser,

    Calico is the plugin in this case. If the kubectl describe pod | grep cni command returns a list of Annotations with IP addresses from the default Calico pool 192.168.0.0/16 then it should be working as expected. The missing log_file_path may be just a misconfiguration of the plugin, possibly tied in with your lab environment's setup.

    When pasting code into the forum, you can use the Code option from the Format menu (the reversed P) to make code more legible, and to preserve indentation and overall formatting.

    Regards,
    -Chris

Categories

Upcoming Training