You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: hack/test-smoke.sh
+23-1Lines changed: 23 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -56,16 +56,38 @@ EOF
56
56
57
57
INFO "GET PODS"
58
58
kubectl get pods
59
+
kubectl get pods -n kube-system
59
60
INFO "DESCRIBE PODS"
60
61
kubectl describe pods
61
62
fornamein$(kubectl get pods -o json | jq -r .items[].metadata.name)
62
63
do
63
64
kubectl logs $name
65
+
kubectl exec -it $name -- cat /etc/resolv.conf
64
66
done
65
67
68
+
INFO "Patching CoreDNS to use 8.8.8.8"
69
+
kubectl get configmap coredns -n kube-system -o yaml | \
70
+
sed 's/forward . \/etc\/resolv.conf/forward . 8.8.8.8/'| \
71
+
kubectl apply -f -
72
+
73
+
INFO "Restarting CoreDNS"
74
+
kubectl delete pod -n kube-system -l k8s-app=kube-dns
75
+
kubectl rollout status deployment coredns -n kube-system
76
+
66
77
INFO "Connecting to dnstest-{0,1,2}.dnstest.default.svc.cluster.local"
67
-
kubectl run -i --rm --image=alpine --restart=Never dnstest-shell -- sh -exc 'for f in $(seq 0 2); do wget -O- http://dnstest-${f}.dnstest.default.svc.cluster.local; done'
78
+
kubectl run -i --rm --image=busybox:1.28 --restart=Never dnstest-shell -- sh -exc '
79
+
echo "--- Resolv.conf ---"
80
+
cat /etc/resolv.conf
81
+
82
+
echo "--- Testing External DNS (google.com) ---"
83
+
nslookup google.com || echo "External DNS Failed"
84
+
85
+
echo "--- Testing Internal DNS (dnstest-0) ---"
86
+
nslookup dnstest-0.dnstest || echo "Internal DNS Failed"
0 commit comments