Giter Club home page Giter Club logo

kgw's Introduction

Kusk Gateway CLI

PRs Welcome

A CLI utility helper for creating Kusk Gateway API resources from your OpenAPI specification document.

image


Table of contents

Usage

(Back to top)

Flags

Flag Description Required?
--name the name to give the API resource e.g. --name my-api
--namespace / -n the namespace of the API resource e.g. --namespace my-namespace, -n my-namespace (default: default)
--in / -i file path or URL to OpenAPI spec file to generate mappings from. e.g. --in apispec.yaml
--upstream.service name of upstream Kubernetes service
--upstream.namespace namespace of upstream service (default: default)
--upstream.port port that upstream service is exposed on (default: 80)

Example

Take a look at the http-bin example spec

kgw api generate -i ./examples/httpbin-spec.yaml --name httpbin-api --upstream.service httpbin --upstream.port 8080

The output should contain the following x-kusk extension at the top level

...
x-kusk:
  cors: {}
  path:
    rewrite:
      pattern: ""
      substitution: ""
  upstream:
    service:
	name: httpbin
	namespace: default
	port: 8080

Installation

(Back to top)

Homebrew

brew install kubeshop/kusk/kgw

Go install the latest release on Github

go install github.com/kubeshop/kgw@latest

To install a particular version: replace latest with the version number

You can get a list of the available kgw versions from our releases page

Easy install script

This will install kgw into /usr/local/bin/kgw

bash < <(curl -sSLf https://raw.githubusercontent.com/kubeshop/kgw/main/scripts/install.sh)

From source

git clone [email protected]:kubeshop/kgw.git && \
cd kgw && \
go install

Alternative installation method (manual)

If you don't like automatic scripts you can always use the manual install:

  1. Download binary with version of your choice (recent one is recommended)
  2. Upack it (tar -zxvf kgw_0.1.0_Linux_arm64.tar.gz)
  3. Move it to a location in the PATH. For example mv kgw_0.1.0_Linux_arm64/kgw /usr/local/bin/kgw

For Windows, download the binary from here, unpack the binary and add it to %PATH%.

Updating

(Back to top)

Homebrew

brew upgrade kubeshop/kusk/kgw

Latest release on Github

go install github.com/kubeshop/kgw@$VERSION

From source

Insde of the kgw repository directory

git pull && go install

Contributing

(Back to top)

Your contributions are always welcome! Please have a look at the contribution guidelines first.

License

(Back to top)

MIT. Please have a look at the LICENSE for more details.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.