Readiness probe failed: Get http://10.244.2.183:5000/: dial tcp 10.244.2.183:5000: connect: connection refused Back-off restarting failed container

7/3/2019

I am trying to deploy my application by using Gitlab-CI through pushing the docker images on Azure container and from there deploying the images on azure kubernetes service. these all process is happening automatically through GitlabCI. but i'm facing challenge in deployment section. i can able to see the services, pods is running status also tiller is deployed on kubernetes but it is throwing the below errorenter image description here This is deployment YAML which i took from kubernetes

{
  "kind": "Deployment",
  "apiVersion": "extensions/v1beta1",
  "metadata": {
    "name": "review-37-in-cust-iosa7i",
    "namespace": "XYZ",
    "selfLink": "/apis/extensions/v1beta1/namespaces/XYZ/deployments/review-37-in-cust-iosa7i",
    "uid": "9f5f7fff-9d65-11e9-8ceb-0e7a6fb80992",
    "resourceVersion": "7143337",
    "generation": 1,
    "creationTimestamp": "2019-07-03T07:39:00Z",
    "labels": {
      "app": "review-37-in-cust-iosa7i",
      "chart": "auto-deploy-app-0.2.9",
      "heritage": "Tiller",
      "release": "review-37-in-cust-iosa7i",
      "tier": "web",
      "track": "stable"
    },
    "annotations": {
      "deployment.kubernetes.io/revision": "1"
    }
  },
  "spec": {
    "replicas": 1,
    "selector": {
      "matchLabels": {
        "app": "review-37-in-cust-iosa7i",
        "release": "review-37-in-cust-iosa7i",
        "tier": "web",
        "track": "stable"
      }
    },
    "template": {
      "metadata": {
        "creationTimestamp": null,
        "labels": {
          "app": "review-37-in-cust-iosa7i",
          "release": "review-37-in-cust-iosa7i",
          "tier": "web",
          "track": "stable"
        },
        "annotations": {
          "checksum/application-secrets": ""
        }
      },
      "spec": {
        "containers": [
          {
            "name": "auto-deploy-app",
            "image": "stratuscentcrdeve.azurecr.io/XYZ/dev/37-in-customer-group-customer-form-when-admin-opens-up-the-poli:65d2e2bc554242c584d5c6480e172690659ef98b",
            "ports": [
              {
                "name": "web",
                "containerPort": 5000,
                "protocol": "TCP"
              }
            ],
            "env": [
              {
                "name": "DATABASE_URL",
                "value": "postgres://user:testing-password@review-37-in-cust-iosa7i-postgres:5432/review-37-in-cust-iosa7i"
              }
            ],
            "resources": {},
            "livenessProbe": {
              "httpGet": {
                "path": "/",
                "port": 5000,
                "scheme": "HTTP"
              },
              "initialDelaySeconds": 15,
              "timeoutSeconds": 15,
              "periodSeconds": 10,
              "successThreshold": 1,
              "failureThreshold": 3
            },
            "readinessProbe": {
              "httpGet": {
                "path": "/",
                "port": 5000,
                "scheme": "HTTP"
              },
              "initialDelaySeconds": 5,
              "timeoutSeconds": 3,
              "periodSeconds": 10,
              "successThreshold": 1,
              "failureThreshold": 3
            },
            "terminationMessagePath": "/dev/termination-log",
            "terminationMessagePolicy": "File",
            "imagePullPolicy": "IfNotPresent"
          }
        ],
        "restartPolicy": "Always",
        "terminationGracePeriodSeconds": 30,
        "dnsPolicy": "ClusterFirst",
        "securityContext": {},
        "imagePullSecrets": [
          {
            "name": "gitlab-registry"
          }
        ],
        "schedulerName": "default-scheduler"
      }
    },
    "strategy": {
      "type": "RollingUpdate",
      "rollingUpdate": {
        "maxUnavailable": 1,
        "maxSurge": 1
      }
    },
    "revisionHistoryLimit": 2147483647,
    "progressDeadlineSeconds": 2147483647
  },
  "status": {
    "observedGeneration": 1,
    "replicas": 1,
    "updatedReplicas": 1,
    "unavailableReplicas": 1,
    "conditions": [
      {
        "type": "Available",
        "status": "True",
        "lastUpdateTime": "2019-07-03T07:39:00Z",
        "lastTransitionTime": "2019-07-03T07:39:00Z",
        "reason": "MinimumReplicasAvailable",
        "message": "Deployment has minimum availability."
      }
    ]
  }
}

Please comment if any additional info is required?

-- Pavan
azure-devops
docker
gitlab-ci
kubernetes
kubernetes-helm

0 Answers