Skip to content
2023 API Summit Hackathon: Experiment with AI for APIs (August 28 - September 27) Learn More →
Kong Logo | Kong Docs Logo
search
  • We're Hiring!
  • Docs
    • Kong Gateway
      Lightweight, fast, and flexible cloud-native API gateway
      Kong Konnect
      Single platform for SaaS end-to-end connectivity
      Kong Mesh
      Enterprise service mesh based on Kuma and Envoy
      decK
      Helps manage Kong’s configuration in a declarative fashion
      Kong Ingress Controller
      Works inside a Kubernetes cluster and configures Kong to proxy traffic
      Kong Gateway Operator
      Manage your Kong deployments on Kubernetes using YAML Manifests
      Insomnia
      Collaborative API development platform
      Kuma
      Open-source distributed control plane with a bundled Envoy Proxy integration
  • API Specs
  • Plugin Hub
    • Explore the Plugin Hub
      View all plugins View all plugins View all plugins arrow image
    • Functionality View all View all arrow image
      View all plugins
      Authentication's icon
      Authentication
      Protect your services with an authentication layer
      Security's icon
      Security
      Protect your services with additional security layer
      Traffic Control's icon
      Traffic Control
      Manage, throttle and restrict inbound and outbound API traffic
      Serverless's icon
      Serverless
      Invoke serverless functions in combination with other plugins
      Analytics & Monitoring's icon
      Analytics & Monitoring
      Visualize, inspect and monitor APIs and microservices traffic
      Transformations's icon
      Transformations
      Transform request and responses on the fly on Kong
      Logging's icon
      Logging
      Log request and response data using the best transport for your infrastructure
  • Support
  • Community
  • Kong Academy
Get a Demo Start Free Trial
Kong Konnect
  • Home icon
  • Kong Konnect
  • Getting Started
  • Proxy and Test a Service
github-edit-pageEdit this page
report-issueReport an issue
  • Kong Gateway
  • Kong Konnect
  • Kong Mesh
  • Plugin Hub
  • decK
  • Kong Ingress Controller
  • Kong Gateway Operator
  • Insomnia
  • Kuma

  • Docs contribution guidelines
enterprise-switcher-icon Switch to OSS
On this pageOn this page
  • Prerequisites
  • Implement a Gateway service
  • Verify the implementation
  • Summary and next steps

Proxy and Test a Service

Create a Konnect Gateway service to proxy your APIs. In this guide, you will create, proxy, and test a gateway service using Gateway Manager in Konnect.

When you create a service, you also specify the route to it. This route, combined with the proxy URL for the service, will lead to the endpoint specified in the API product deployment.

Prerequisites

If you’re following the Konnect quickstart guide, make sure you have configured a data plane node.

Implement a Gateway service

In the runtimes icon Gateway Manager, select the Default control plane and follow these steps:

  1. Select Gateway Services from the side navigation bar, then New Gateway Service.

  2. From the Add a Gateway Service dialog, create a new service:

    1. Enter a unique name for the Gateway service, or specify a Gateway service that doesn’t yet have a version connected to it.

      For the purpose of this example, enter example_gateway_service.

      The name can be any string containing letters, numbers, or the following characters: ., -, _, ~, or :. Do not use spaces.

      For example, you can use example_service, ExampleService, Example-Service. However, Example Service is invalid.

    2. In the add using upstream URL field, enter http://mockbin.org.

    3. Use the defaults for the remaining fields.

    4. Click Save.

  3. Add a route to your service implementation by clicking the Add a Route button now visible from the Gateway service dashboard.

    For this example, enter the following:

    • Name: mockbin
    • Protocols: HTTP, HTTPS
    • Path(s): /mock
  4. Click Save.

Verify the implementation

If you used the Docker script to connect a data plane earlier in Configure a data plane node, your default proxy URL is localhost:8000.

Enter the proxy URL into your browser’s address bar and append the route path you just set. The final URL should look something like this:

http://localhost:8000/mock

If successful, you should see the homepage for mockbin.org. In the Gateway Manager you will now see a 200 responses recorded in the Analytics tab.

And that’s it! You have your first service set up, running, and routing traffic proxied through a Kong Gateway data plane node.

Summary and next steps

To summarize, in this topic you:

  • Implemented a Gateway service example_gateway_service and the route /mock. This means if an HTTP request is sent to the Kong Gateway node and it matches route /mock, that request is sent to http://mockbin.org.
  • Abstracted a backend/upstream service and put a route of your choice on the front end, which you can now give to clients to make requests.

Next, productize your service with an API product.

Thank you for your feedback.
Was this page useful?
Too much on your plate? close cta icon
More features, less infrastructure with Kong Konnect. 1M requests per month for free.
Try it for Free
  • Kong
    THE CLOUD CONNECTIVITY COMPANY

    Kong powers reliable digital connections across APIs, hybrid and multi-cloud environments.

    • Company
    • Customers
    • Events
    • Investors
    • Careers Hiring!
    • Partners
    • Press
    • Contact
  • Products
    • Kong Konnect
    • Kong Gateway
    • Kong Mesh
    • Get Started
    • Pricing
  • Resources
    • eBooks
    • Webinars
    • Briefs
    • Blog
    • API Gateway
    • Microservices
  • Open Source
    • Install Kong Gateway
    • Kong Community
    • Kubernetes Ingress
    • Kuma
    • Insomnia
  • Solutions
    • Decentralize
    • Secure & Govern
    • Create a Dev Platform
    • API Gateway
    • Kubernetes
    • Service Mesh
Star
  • Terms•Privacy
© Kong Inc. 2023