         sleep $interval
         duration=$((duration + interval))
 
-        response_code=$(kubectl exec -n $2 $1 -c $5 -- echo 'i am alive')
+        response_code=$(kubectl exec -n $2 $1 -c $5 -- echo 'i am alive' || exit 1)
       done
 
       echo ' succeeded!'


      sleep $interval

      declare response_code=$(kubectl exec -n $2 $1 -c $5 -- echo 'i am alive')

      echo -n $5 : 'health-check : '


    }

    function check_pod_response () {
      declare response_code=$(kubectl get pods --namespace koding -o jsonpath="{.items[0].status.phase}" || exit 1)

      if [[ $response_code == *"Pending"* ]]; then
        return 1
