         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)
+        declare response_code=$(kubectl get pods --namespace service-dev -o jsonpath="{.items[0].status.phase}")
       done
 
-      echo ' succeeded!'
+      echo 'pod is in the ready state'
     }
 
     function switch_client_version () {

      declare duration=0

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

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


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

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

      echo ' succeeded!'
    }

    function check_pod_ready () {
      declare interval=5
      declare timeout=600
      declare duration=0
      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
