Skip to content

Docker image and Kubernetes

The standa-alone application can run in Kubernetes using our image Before using it check for the latest version of the image by visiting the link.


docker run  \
  -v "$PWD":/app/api \
  -e API_PROJECT="api.raml" \
  -e API_TYPE="RAML 1.0" \
  -e API_MIME="application/raml" \

This command assumes that you are running it in your API definition folder.

The -v "$PWD":/app/api option tells the docker to mount current directory ("$PWD") to /app/api of the running instance. The application looks for the API data there.

-e API_PROJECT="api.raml" is a required variable and it points to the API main file in current directory.

Remote sources

The API_PROJECT variable can points to a publicly accessible API specification file on the internet. In this case the -v option is not needed.

-e API_TYPE="RAML 1.0" variable tells the application what is the type of the API. It must be one of the supported API formats.

Automatic type lookup

When API_TYPE or API_MIME variable is not set then the application tries to recognize the correct value. If the automation fails try to define own values.

-e API_MIME="application/raml" variable represents the media type of the API. RAML project has only application/raml mime type. OAS can be application/yaml or application/json.

Application port

By default the application runs on port 8080. You can change this behavior by setting PORT environment variable.

Deploying to Kubernetes

Below is an example deployment configuration for your container.

apiVersion: apps/v1
kind: Deployment
  name: apiconsole-frontend
    app: apiconsole-www
      app: apiconsole
      tier: frontend
  replicas: 3
        app: apiconsole
        tier: frontend
      - name: apiconsole-www
        - name: API_PROJECT
        - name: API_TYPE
          value: "RAML 1.0"
        - name: API_MIME
          value: "application/raml"

This example assumes the API is available publicly over internet. You can use volumes property in the deployment configuration. See Deployment and Volumes documentation for more details.