Skip to main content

kongctl - a CLI for kong admin interface.

Project description

A command line client for kong admin API

This tool ease kong management like getting routes for service name (not id):

kongctl -s https://localhost:8001 list routes -s example-service

1ba43640-6977-4d6a-9804-6e0032d77bb1: example-service
  example.com/

d091d9c4-fde8-4982-b984-8376bd544aaf: example-service
  example.com/api/v1

You can store your configuration in multiple yaml files and apply them individually. Let’s assume you have configuration like this:

_format_version: "1.1"

services:
  - name: orders-service
    url: http://kubernetes-inner.host:80/path-to-ns/orders
    routes:
      - name: orders-root
        strip_path: true
        hosts:
          - orders.example.com

    plugins:
      - name: jwt
        enabled: false
        route:
          name: orders-root

        run_on: first
        config:
          key_claim_name: iss
          cookie_names: {}
          secret_is_base64: false
          maximum_expiration: 0
          anonymous:
          run_on_preflight: true
          uri_param_names:
            - jwt

Now you can call the following command to apply it:

kongctl -s https://localhost:8001 ensure order-service.yaml

Installation

brew tap kepkin/kongctl
brew install kongctl

or

pip3 install kongctl

Quick guide to usage

mkdir ~/.kongctl
cat  > ~/.kongctl/qa-env << EOF
{
  "client": {
    "server": "https://my-kong.url:8001",
    "auth": {
      "password": "pass",
      "type": "basic",
      "user": "user"
    }
  },
  "var_map": {
    "VAR1": "VALUE1",
    "VAR2": "VALUE2"
  }
}
EOF

kong -c qa-env list services

TODO

  • Support for OIDC authorization

  • Get stubs for create operation

  • Support all key-auth like plugins

  • Support update from cmd args

  • Support yaml

  • Sort by id?

  • list command filter option

  • Autocomplete

  • Add images instead of code in README (to show color support)

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

kongctl-0.3.8.tar.gz (16.7 kB view details)

Uploaded Source

Built Distributions

kongctl-0.3.8-py3.8.egg (39.9 kB view details)

Uploaded Source

kongctl-0.3.8-py2.py3-none-any.whl (17.2 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file kongctl-0.3.8.tar.gz.

File metadata

  • Download URL: kongctl-0.3.8.tar.gz
  • Upload date:
  • Size: 16.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.12

File hashes

Hashes for kongctl-0.3.8.tar.gz
Algorithm Hash digest
SHA256 faaa924c45a243752b7b824a7037ab338002221e26cb8e6be51fe5321b50c00f
MD5 0f0ee8457b8ca3e0e29b7160e529e1a6
BLAKE2b-256 93bf9bac264b0fa63046f03253de880da190e1a850556904ebcc9df4e7f026bd

See more details on using hashes here.

File details

Details for the file kongctl-0.3.8-py3.8.egg.

File metadata

  • Download URL: kongctl-0.3.8-py3.8.egg
  • Upload date:
  • Size: 39.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.4.0 pkginfo/1.7.0 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.8.5

File hashes

Hashes for kongctl-0.3.8-py3.8.egg
Algorithm Hash digest
SHA256 f3fbe537d822c133dc79232409a127910a9586fec053bcef86408b79119a2ace
MD5 e0d34da65bd581727209478b69eb2e8d
BLAKE2b-256 3cf8052b1f2f4e4b5b1779b66e1e71ca0bc12a15738320d50baf5a05d768dc7c

See more details on using hashes here.

File details

Details for the file kongctl-0.3.8-py2.py3-none-any.whl.

File metadata

  • Download URL: kongctl-0.3.8-py2.py3-none-any.whl
  • Upload date:
  • Size: 17.2 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.12

File hashes

Hashes for kongctl-0.3.8-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 228bf811ec6aa5fd94b61828c4d6386e8416bc062a45f73cde31262192629e2a
MD5 aaaa830207c41aeaa446cbfee6cfbe70
BLAKE2b-256 7b0c206f7f254f7b37790ea8c0a6be650bdb86d09622d2e6abcb3f5f3ac93db9

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page