WHAT TO EXPECT
In this article, users will learn how to interact with the xNIC Daemonset on any of the supported clouds (AKS, EKS, OCI, or GKE).
Restarting xNIC DaemonSet
To restart the xNIC DaemonSet for K8s, run the following command:
kubectl rollout restart ds/swx-xnic -n kube-systemGetting a shell to an xNIC DaemonSet pod
At times, it is useful to be able to get into the pod and run commands such as swx-tcpdump. To accomplish this, follow these steps:
Connect to a machine that has access to the Kubernetes cluster using Cloud Shell or any other means.
Enter the following command to get the pod name:
kubectl get pods -l app=swx-xnic -n kube-systemExample:
$ kubectl get pods -l app=swx-xnic -n kube-system NAME READY STATUS RESTARTS AGE swx-xnic-fc58t 1/1 Running 0 11d swx-xnic-kn9hg 1/1 Running 0 11dEnter the following command, replacing swx-xnic-<name> with the pod name:
kubectl exec -it pod/swx-xnic-<name> -n kube-system -- bashExample:
$ kubectl exec -it pod/swx-xnic-kn9hg -n kube-system -- bash root@aks-nodepool1-23164585-vmss00000A:/
Users can now enter commands similar to any VM, such as ip a or sudo swx-tcpdump -i eth0. Note that the pods created in this example do not have tools such as the standard tcpdump. However, swx-tcpdump will work. For testing, see swxtch-perf under Testing cloudSwXtch.
Switching Contexts
If users have more than one AKS Kubernetes cluster, then they may need to change the context to work on the desired instance.
Accessing xNIC Logs
Users can get xNIC logs once signed in to the pod. See How to View xNIC Logs page.
Using xNIC config
Getting to the xNIC config is available once the user has signed into the Pod. To get to the xNIC config, use the command below:
cat /var/opt/swxtch/swxtch-xnic.confExiting the Pod
To exit the pod, enter the following command:
exit