Not able to reach admin api through kong manager gui using docker-compose

I am a developer trying using this repo as a base to instantiate kong.

In order to use Kong Manager GUI, I updated this service:

kong:

    platform: linux/amd64

    image: "${KONG_DOCKER_TAG:-kong:latest}"

    user: "${KONG_USER:-kong}"

    environment:

      <<: *kong-env

      KONG_ADMIN_ACCESS_LOG: /dev/stdout

      KONG_ADMIN_ERROR_LOG: /dev/stderr

      KONG_PROXY_LISTEN: "${KONG_PROXY_LISTEN:-0.0.0.0:8000}"

      KONG_ADMIN_LISTEN: "${KONG_ADMIN_LISTEN:-0.0.0.0:8001}"

      KONG_PROXY_ACCESS_LOG: /dev/stdout

      KONG_PROXY_ERROR_LOG: /dev/stderr

      KONG_PREFIX: ${KONG_PREFIX:-/var/run/kong}

      KONG_DECLARATIVE_CONFIG: "/opt/kong/kong.yaml"

      KONG_ADMIN_GUI_URL: "${KONG_ADMIN_GUI_LISTEN:-http://0.0.0.0:8002}"

      KONG_ADMIN_API_URI: "${KONG_ADMIN_API_LISTEN:-http://0.0.0.0:8001}"

    secrets:

      - kong_postgres_password

    networks:

      - kong-net

    ports:

      # The following two environment variables default to an insecure value (0.0.0.0)

      # according to the CIS Security test.

      - "${KONG_INBOUND_PROXY_LISTEN:-0.0.0.0}:8000:8000/tcp"

      - "${KONG_ADMIN_GUI_URL:-0.0.0.0}:8002:8002/tcp"

      - "${KONG_INBOUND_SSL_PROXY_LISTEN:-0.0.0.0}:8443:8443/tcp"

      # Making them mandatory but undefined, like so would be backwards-breaking:

      # - "${KONG_INBOUND_PROXY_LISTEN?Missing inbound proxy host}:8000:8000/tcp"

      # - "${KONG_INBOUND_SSL_PROXY_LISTEN?Missing inbound proxy ssl host}:8443:8443/tcp"

      # Alternative is deactivating check 5.13 in the security bench, if we consider Kong's own config to be enough security here

      - "127.0.0.1:8001:8001/tcp"

      - "127.0.0.1:8444:8444/tcp"

    healthcheck:

      test: ["CMD", "kong", "health"]

      interval: 10s

      timeout: 10s

      retries: 10

    restart: on-failure:5

    read_only: true

    volumes:

      - kong_prefix_vol:${KONG_PREFIX:-/var/run/kong}

      - kong_tmp_vol:/tmp

      - ./config:/opt/kong

    security_opt:

      - no-new-privileges

I run it with KONG_DOCKER_TAG=kong/kong-gateway:2.7.0.0-alpine docker-compose up -d command

However, when I open http://IP:8002/overview I see on the console

GET http://0.0.0.0:8001/default/kong net::ERR_ADDRESS_INVALID

I already checked this answer where it recommends to set admin_gui_url and admin_api_uri, which I already did.

am I missing something else? I don’t have a lot of knowledge of docker


© 2019 Kong Inc.    Terms  •  Privacy  •  FAQ