title: How to run command after initialization
body: <p>I would like to run specific command after initialization of deployment is successful.</p>
  
  <p>This is my yaml file:</p>
  
  <pre><code>apiVersion: extensions/v1beta1
  kind: Deployment
  metadata:
    name: auth
  spec:
    replicas: 1
    template:
      metadata:
          labels:
            app: auth
      spec:
        containers:
          - name: auth
            image: {{my-service-image}}
            env:
            - name: NODE_ENV
              value: "docker-dev"
            resources:
              requests:
                cpu: 100m
                memory: 100Mi
            ports:
              - containerPort: 3000
  </code></pre>
  
  <p>However, I would like to run command for db migration after (not before) deployment is successfully initialized and pods are running. </p>
  
  <p>I can do it manually for every pod (with kubectl exec), but this is not very scalable.</p>