version: "3"
services:
  web:
    image: nginx
    labels:
      kompose.init.containers.name: "init-myservice"
      kompose.init.containers.image: "busybox:1.28"
      kompose.init.containers.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"]'