apiVersion: v1
kind: Pod
metadata:
  name: init-pod
  labels:
    app: initapp
spec:
  containers:
  - name: main-container
    image: busybox
    command: ['sh', '-c', 'echo main app running && sleep 3600'] 
  initContainers:
  - name: init-myservie
    image: busybox
    command: ['sh', '-c', 'until nslookup myservice; do echo waiting for myservice; sleep 2; done'] 
  - name: init-db
    image: busybox
    command: ['sh', '-c', 'until nslookup mydb; do echo waiting for mydb; sleep 2; done'] 
