         sleep $interval
         duration=$((duration + interval))
 
-        declare response_code=$(kubectl exec -n $2 $1 -- echo 'i am alive')
+        declare response_code=$(kubectl exec -n $2 $1 -c $5 -- echo 'i am alive')
       done
 
       echo ' succeeded!'
     }
 
-    function k8s_health_check () {
-      declare interval=$2
-      declare timeout=$3
+    function check_pod_ready () {
+      declare interval=5
+      declare timeout=600
       declare duration=0
-
-      sleep $interval
-      kubectl exec $1 -- echo 'i am alive' >/tmp/response.log 2>&1
-      declare response_code=$(tail -1 /tmp/response.log)
-
-      echo -n 'health-check: '
-
-      until [[ $response_code != *"error"* ]]; do
+      declare response_code=$(kubectl get pods --namespace service-dev -o jsonpath="{.items[0].status.phase}")
+
+      until [[ $response_code != *"Pending"* ]]; do
         if [ $duration -eq $timeout ]; then
           echo ' timed out!'
           exit 255

        sleep $interval
        duration=$((duration + interval))

        kubectl exec $1 -- echo 'i am alive' >/tmp/response.log 2>&1
        declare response_code=$(tail -1 /tmp/response.log)
      done

      echo ' succeeded!'
    }

    function switch_client_version () {

      declare duration=0

      sleep $interval

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

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

