apiVersion: v1
kind: Pod
metadata:
  namespace: default
  name: svc-lookup
  labels:
    app: svc-lookup
spec:
  restartPolicy: OnFailure
  containers:
  - name: svc-lookup
    image: busybox:1.28
    command: ['sh', '-c', 'until nslookup myservice.$(cat /var/run/secrets/kubernetes.io/serviceaccount/namespace).svc.cluster.local; do echo waiting for myservice; sleep 2; done']
    ports:
      - containerPort: 5000