--- title: "Working with Kubernetes clusters and xNIC DS" slug: "working-with-kubernetes-clusters-and-xnic-ds" updated: 2025-12-19T20:10:57Z published: 2025-12-19T20:10:57Z canonical: "docs.swxtch.io/working-with-kubernetes-clusters-and-xnic-ds" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.swxtch.io/llms.txt > Use this file to discover all available pages before exploring further. # Working with Kubernetes clusters and xNIC DS > [!NOTE] > **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: ```shell kubectl rollout restart ds/swx-xnic -n kube-system ``` ### Getting 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: 1. Connect to a machine that has access to the Kubernetes cluster using **Cloud Shell** or any other means. 2. Enter the following command to get the pod name: ```shell kubectl get pods -l app=swx-xnic -n kube-system ``` Example: ```shell $ 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          11d ``` 3. Enter the following command, replacing swx-xnic- with the pod name: ```shell kubectl exec -it pod/swx-xnic- -n kube-system -- bash ``` Example: ```shell $ 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](/v2/docs/testing). > **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](/v2/docs/how-to-find-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: ```shell cat /var/opt/swxtch/swxtch-xnic.conf ``` ### Exiting the Pod To exit the pod, enter the following command: ```shell exit ```