Unauthorized
’ error.2024-04-17T03:30:44Z [error] SetNetworkStatus: failed to query the pod POD_NAME-cluster-0 in out of cluster comm: Unauthorized
2024-04-17T03:30:44Z [error] Multus: error unsetting the networks status: SetNetworkStatus: failed to query the pod POD_NAME-cluster-0 in out of cluster comm: Unauthorized
2024-04-17T03:30:55Z [error] delegateAdd: pod nil pointer: namespace: NAMESPACE_NAME, name: POD_NAME-cluster-0, container id: CONTAINER_ID, pod: nil
/etc/cni/net.d/00-multus.conf
’ file. Add the following:"logLevel": "debug",
"logFile": "/var/log/multus.log"
Multus 4.0.1, which is included in TKG 2.3, has a mechanism to rotate the certificate and token. Whereabouts doesn’t have this mechanism to rotate the certificate and token as of TKG 2.5.
multus.kubeconfig
` and `whereabouts.kubeconfig
` expire. Users can inspect the file and decode the token to check expiry date. for p in $(kubectl get pod -n kube-system -l app=multus --no-headers -o name); do echo $p kubeconf-token exp=$(date -d @$(kubectl exec -it -n kube-system $p -- cat /host/etc/cni/net.d/multus.d/multus.kubeconfig | grep token | awk '{ print $2 }' | awk -F'.' '{print $2}' | tr '_-' '/+' |\
sed 's/\./\n/g' | \
sed 's/-/+/g; s/_/\//g' | \
while read part; do \
len=$((${#part} % 4)); \
if [ $len -eq 2 ]; then part="${part}=="; fi; \
if [ $len -eq 3 ]; then part="${part}="; fi; \
echo "$part" | base64 -d; \
done | jq '.exp')); done
for p in $(kubectl get pod -n kube-system -l app=whereabouts --no-headers -o name); do echo $p kubeconf-token exp=$(date -d @$(kubectl exec -it -n kube-system $p -- cat /host/etc/cni/net.d/whereabouts.d/whereabouts.kubeconfig | grep token | awk '{ print $2 }' | awk -F'.' '{print $2}' | tr '_-' '/+' |\
sed 's/\./\n/g' | \
sed 's/-/+/g; s/_/\//g' | \
while read part; do \
len=$((${#part} % 4)); \
if [ $len -eq 2 ]; then part="${part}=="; fi; \
if [ $len -eq 3 ]; then part="${part}="; fi; \
echo "$part" | base64 -d; \
done | jq '.exp')); done
kubectl -n kube-system rollout restart daemonset --selector=app=multus
kubectl -n kube-system rollout restart daemonset --selector=app=whereabouts
watch kubectl -n kube-system get pod --selector=app=multus
watch kubectl -n kube-system get pod --selector=app=whereabouts