What is the default gateway configured on the PODs scheduled on node03?
Try scheduling a pod on node03 and check ip route output
How to get this ?
What is the default gateway configured on the PODs scheduled on node03?
Try scheduling a pod on node03 and check ip route output
How to get this ?
First give label to node or find a default labels on the node. Then use a “node selector” field in your Pod template or you can use “nodeName” field. To get a ip route o/p. Use a busybox docker image to process ip route command in the Pod’s container.
Hello satyam,
Please check the following gif:
apiVersion: v1
kind: Pod
metadata:
name: busybox
labels:
app: busybox
spec:
containers:
- image: busybox
command:
- sleep
- "3600"
imagePullPolicy: IfNotPresent
name: busybox
restartPolicy: Always
nodeName: node03
get a shell to this pod kubectl exec -it busybox sh
, then run ip route
to get the default gateway