Skip to content
Kong Logo | Kong Docs Logo
search
  • We're Hiring!
  • Docs
    • Kong Gateway
    • Kong Konnect
    • Kong Mesh
    • Plugin Hub
    • decK
    • Kubernetes Ingress Controller
    • Insomnia
    • Kuma

    • Docs contribution guidelines
  • Plugin Hub
  • Support
  • Community
  • Kong Academy
Get a Demo Start Free Trial
  • Kong Gateway
  • Kong Konnect
  • Kong Mesh
  • Plugin Hub
  • decK
  • Kubernetes Ingress Controller
  • Insomnia
  • Kuma

  • Docs contribution guidelines
    • Overview of Konnect
    • Architecture
    • Network Resiliency and Availability
    • Port and Network Requirements
    • Compatibility
    • Stages of Software Availability
    • Release Notes
      • Control Plane Upgrades FAQ
      • Supported Installation Options
    • Overview
    • Access a Konnect Account
    • Set up a Runtime
    • Configure a Service
    • Implement and Test the Service
      • Publish and Consume Services
      • Register Applications
    • Import Kong Gateway Entities into Konnect
    • Overview
      • Overview
      • Dashboard
      • Manage Runtime Groups with UI
      • Manage Runtime Groups with decK
      • Installation Options
      • Install with Docker
      • Install on Kubernetes
      • Install on Linux
      • Install on AWS
      • Install on Azure
      • Upgrade a Runtime Instance to a New Version
      • Renew Certificates
      • Runtime Parameter Reference
    • Create Consumer Groups
      • Overview
      • Set Up and Use a Vault in Konnect
    • Kong Gateway Configuration in Konnect
    • Plugin Ordering Reference
    • Troubleshoot
    • Overview
    • Manage Service Documentation
      • Overview
      • Configure a Plugin on a Service
      • Configure a Plugin on a Route
    • Overview
    • Access the Dev Portal
    • Sign Up for a Dev Portal Account
      • Manage Developer Access
      • Manage Application Registration Requests
      • Manage Application Connections
      • Auto Approve Dev and App Registrations
      • Azure OIDC
      • Application Overview
      • Enable and Disable App Registration
        • Overview
        • Okta
        • Curity
        • Auth0
      • Create, Edit, and Delete an Application
      • Register an Application with a Service
      • Generate Credentials for an Application
    • Customize Dev Portal
    • Troubleshoot
    • Introduction to Analytics
    • Analyze Services and Routes
    • Reports Use Cases
    • Reports Reference
    • Troubleshoot
      • Manage a Konnect Account or Plan
      • Change to a Different Plan
      • Manage Payment Methods and Invoices
      • Overview
        • Overview
        • Manage Teams
        • Teams Reference
        • Roles Reference
      • Manage Users
      • Manage System Accounts
      • Set up SSO with OIDC
      • Set up SSO with Okta
      • Login Sessions Reference
    • Account and Org Deactivation
    • Troubleshoot
    • Overview
      • API Documentation
      • Identity Integration Guide
      • API Documentation
      • API Documentation
      • Portal RBAC Guide
      • Overview
      • Nodes
      • Data Plane Certificiates
        • Services
        • Routes
        • Consumers
        • Plugins
        • Upstreams
        • Certificates
        • CA Certificates
        • SNIs
        • Targets
        • Vaults
      • API Spec
      • Filtering
    • Labels

github-edit-pageEdit this page

report-issueReport an issue

enterprise-switcher-iconSwitch to OSS

On this page
  • Prerequisites
  • Implement a service version
  • Check the Gateway service
  • Verify the implementation
  • Summary and next steps
Kong Konnect
  • Home
  • Kong Konnect
  • Getting Started
  • Implement and Test a Service

Implement and Test a Service

Create a service implementation to expose your Konnect service to clients.

When you create an implementation, 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 service implementation.

Prerequisites

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

Implement a service version

  1. In the servicehub icon Service Hub, open a service, then pick a version.

    For example, use example_service with a version named v1.

  2. Click New Implementation.

  3. In the Create Implementation dialog, in step 1, create a new service implementation to associate with your service version.

    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.

    1. In the URL field, enter http://mockbin.org.

    2. Use the defaults for the remaining fields.

    3. Click Next.

  4. Add a route to your service implementation.

    For this example, enter the following:

    • Name: mockbin
    • Method: GET
    • Path(s): Click Add Path and enter /mock

    For the remaining fields, use the default values listed.

  5. Click Create.

    The v1 service version overview displays.

    If you want to view the configuration, edit or delete the implementation, or delete the version, click the Version actions menu.

Check the Gateway service

Every time you create a service implementation, Konnect creates or connects to a parallel Kong Gateway service to proxy requests based on your configuration. Let’s check out the service you just created.

  1. From the main menu, open the runtimes icon Runtime Manager.

  2. Open the runtime group that you chose for your service version.

  3. Open Gateway Services from the sub-menu, then click on the example_gateway_service.

  4. Take a look at the tags to see the connected Konnect service: _KonnectService:example_service

You can manage your Gateway service from here, or from the Service Hub, through the service implementation. All changes will be reflected in both locations.

Verify the implementation

If you used the Docker script to create a container earlier in Configure a Runtime, your runtime’s 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. On your service version overview page, you’ll see a record for status code 200. This might take a few moments.

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

Summary and next steps

To summarize, in this topic you:

  • Implemented the service version v1 with 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, publish the service to the Dev Portal and test out the Portal from the perspective of a developer.

Thank you for your feedback.
Was this page useful?
  • 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