Blog
  • AI Gateway
  • AI Security
  • AIOps
  • API Security
  • API Gateway
|
    • API Management
    • API Development
    • API Design
    • Automation
    • Service Mesh
    • Insomnia
    • View All Blogs
  1. Home
  2. Blog
  3. Engineering
  4. Automating Your Developer Pipeline With APIOps (DevOps + GitOps)
Engineering
June 1, 2021
5 min read

Automating Your Developer Pipeline With APIOps (DevOps + GitOps)

Ross McDonald

Want to learn more about the nuts and bolts of APIOps? Download our eBook, Unlocking the Full Potential of your APIs with APIOps, and learn about the stages of APIOps, get an understanding of the technical assets required, and explore the tooling needed to transform API development and management.

APIOps is the complete end-to-end automation of the API lifecycle, combining DevOps and GitOps. With APIOps, you can enhance your productivity through the reuse of APIs.

In this tutorial, we'll walk you through how to:

  • Set up an end-to-end automation framework in Kong Konnect.
  • Leverage Kong’s declarative configuration tool (decK) to update your API configurations.
  • Tie decK into a CI/CD framework for automating updates in the same way you update and deliver code.
  • Deploy services with a few simple commands using the tools you already use today.
  • Apply policy and govern your services in the same way.

How Does decK Work?

As you can see in the below diagram, decK follows four discrete steps.

  1. Capture the snapshot of our Konnect configuration with the deck konnect dump command.
  2. Update the state file that gets persisted with the changes we want to make. That could be creating a new service, updating a plugin configuration or anything that lives within the Konnect interface.
  3. Compare what we have locally versus what’s inside of Konnect with the deck konnect diff command to ensure that the configurations have not drifted unexpectedly.
  4. Synchronize the changes back into the control plane and push those changes to the data planes (the API gateways) with the deck konnect sync command.

Kong Konnect decK Automation APIOps

Why Should I Use decK?

The goal of decK is to tie the simple building blocks of capture, update, compare and synchronize into your automation pipeline. You can then include these in your existing source control and automation tooling in a machine-readable, easy-to-use format. That way, you'll keep everything within the current change management and governance processes that you already have in place.

Before following the steps below, make sure you have installed decK.

decK Example #1: Change a Plugin Configuration

For a quick example of how you can tie the four steps of decK automation together, let's disable one of our Kong plugins in Konnect.

Kong Konnect Plugins ServiceHub

1. Capture

To capture the current state of our Konnect configuration, run the deck konnect dump command from the terminal or CLI. By default, the system will store the output in YAML format under a konnect.yaml file in your current working directory.

2. Update

Open the konnect.yaml file using a text editor of your choice. Once done, we can see the state that we have persisted inside of the Konnect control plane. Using our example environment, you can see several versions and plugins for the Payment Service.

Kong Service Packages Example

Kong Plugins Settings

Let’s say we want to disable the Bot Detection plugin. Under any plugin, you can find an enabled toggle, which we’ll simply set to false. Save the file.

Kong Plugin Example Disabled

3. Compare

Let’s compare those changes with what’s currently living in Konnect to ensure that the changes we're making are the right ones. For that, we can run deck konnect diff.

Here we can see that we’ve detected one change. Enabled has changed from true to false. We have one updated artifact, which is what we wanted. Now that we've verified the changes, let's update the control plane.

Konnect Plugin Example Konnect Diff

4. Synchronize

To synchronize our changes, we’re going to run deck konnect sync.

The change has persisted.

Kong Plugin Automation Bot Detection

Now, if we refresh the screen in the Konnect interface and go down to our plugins, the Bot Detection plugin is disabled.

Kong plugins bot detection in the Konnect ServiceHub

decK Example #2: Pushing Policy Updates to Kong Konnect

For a more concrete example, I have a GitHub repository configured with GitHub Actions CI/CD functionality. We can use this for pushing policy updates to Konnect.

Kong APIOps starter kit GitHub

Imagine I’m a stakeholder for the payments API service currently deployed. After speaking with our operations team, it turns out the backend service is struggling to keep up with the current request load. They’ve asked that I lower the rate limit to ensure the stability of the backend service. Easy enough.

1. Capture

In Visual Studio Code, we can see the state file from Konnect. The Payment Service is there.

Kong service automation example

Here’s the Rate Limiting plugin.

Kong rate limiting plugin automation

If we expand this, we can view and edit the configuration. It’s currently set to five per second.

Kong Rate Limiting Automation

2. Update

Let’s lower this to two per second.

Kong rate limiting automation

3. Compare

Then, we'll run git diff to compare. We’ve just made a change from five to two.

Kong Konnect git diff

4. Synchronize

As part of my repository settings, we can’t push to the deploy branch specifically, so we’ll have to create a pull request. Run git checkout -b chore/reduce-rate-limit.

Add the changes with git add –all.

Commit them with git commit -m "Reducing rate limit".

Then, push them to GitHub with git push origin chore/reduce-rate-limit.

With our changes pushed, we can open a pull request. But before we do that, let's take a quick look at the GitHub workflow that we defined. We’re using a self-hosted runner. And we're running a deck konnect sync—so a very easy and straightforward pipeline for updating the changes.

Kong Automation with GitHub Actions

We could also include drift detection inside the pipeline to ensure that no changes occurred since we last persisted our state file (for example, another developer didn't make a similar but conflicting change). For this example, we’re going to apply the change via pull request.

Let's deploy our chore/reduce-rate-limit branch.

Kong rate limiting automation setup

Let's create the pull request. In this case, we could have enforced reviewers and different checks. However, since that’s just a testing repository, go ahead and merge.

Kong rate limiting automation GitHub

In the background, our runner is automatically running a series of steps. In this case, just applying that decK configuration.

If we jump to the Konnect interface, we can see the rate limit has now been reduced to two per second, just like we asked.

Kong Konnect Rate Limiting Plugin Config

Back in our service version, we should start to see that the change has been taking effect. Clients should begin seeing 429 errors.

Kong Konnect Vitals traffic status code 429

Conclusion

Kongrats! Now you're ready to get your code to market faster, reuse services more often and be more productive so you can spend more time doing the things you love. No more wasted time waiting for manual API reviews!

You're ready to leverage the decK CLI tool to declaratively capture, compare and apply updates to your Konnect configuration. Doing so could tie back into your CI/CD framework for performing end-to-end updates while keeping your configuration within a source code repository.

That way, you'll be able to leverage your existing change control processes already in place and deliver policy updates and other configuration changes, just like you deliver code. The result will be improved governance, consistency and stability without any hassle.

Start a free trial or contact us if you have any questions as you're getting set up.

Once you've successfully set up APIOps with Konnect decK, you may find these other tutorials helpful:

  • Implementing Client Credentials With Kong and Okta
  • 3 Ways Kong Helps With API Gateway Governance
  • Getting Started with Kong Mesh and Open Policy Agent

Developer agility meets compliance and security. Discover how Kong can help you become an API-first company.

Get a DemoStart for Free
API GatewayAPIOpsGitOpsKong KonnectTutorials

More on this topic

Videos

Cigna's API Gateway Journey with Kong Konnect

Videos

Konnect-ing the Dots Across Organizational Silos: APIOps at the Core of API Transformation

See Kong in action

Accelerate deployments, reduce vulnerabilities, and gain real-time visibility. 

Get a Demo
Topics
API GatewayAPIOpsGitOpsKong KonnectTutorials
Share on Social
Ross McDonald

Recommended posts

Kong-plement Your ServiceHub With a Dev Portal

Kong Logo
EngineeringAugust 5, 2021

Two of the best (in my opinion) features in Konnect are the ServiceHub and Dev Portal. However, they're also two of the most misunderstood. Aren't they the same thing? Why would you need a ServiceHub vs. Dev Portal? Well, I'm glad you asked! The r

Michael Heap

Stay Vendor Agnostic: Using an Abstraction Layer to Navigate Acquisitions

Kong Logo
EnterpriseDecember 12, 2025

The challenges of an acquisition frequently appear in a number of critical areas, especially when dealing with a platform as important as Kafka: API Instability and Change : Merged entities frequently rationalize or re-architect their services, whic

Hugo Guerrero

How to Craft and Sign a Custom JWT in Kong Konnect

Kong Logo
EngineeringJune 18, 2024

The JSON Web Token (JWT) is an open standard that allows information to be transferred securely between different parties. The token is digitally signed by using a private key (HMAC) or a public/private key (RSA) by building a JSON Web Signature (JW

Jerome Guillaume

Automating API Delivery with APIOps and Kong

Kong Logo
EngineeringJune 5, 2024

As organizations build more APIs, manual processes and frequent handoffs in the API development workflow can lead to a slower time to market, higher development costs, and poor-quality APIs. They can also result in APIs being poorly documented, caus

Ikenna Nwaiwu

Kong Konnect EKS Marketplace Add-on for Kong Gateway Data Planes

Kong Logo
EngineeringDecember 7, 2023

Today, we’re excited to release the Kong Konnect EKS Marketplace add-on as a means to deploy your Kong Gateway dataplanes in AWS. The add-ons are a step forward in providing fully managed Kubernetes clusters. It is here to simplify the post-procurem

Danny Freese

How to Customize Your Kong Developer Portal

Kong Logo
EngineeringNovember 11, 2021

A developer portal is a storefront to your APIs (the products) that internal and external developers are trying to consume. The Kong Developer Portal provides a single source of truth for all developers to locate, access and consume services. With

Sven Walther

Kong Gateway Tutorial: Running With a GUI in <15 Minutes

Kong Logo
EngineeringApril 8, 2021

In this Kong Gateway tutorial, you'll learn how to: Download and install Kong Add a service Add a route Add the key authentication plugin Add the proxy cache plugin Test plugins using Insomnia Keep in mind that these instructions are a starting poi

Manny Khadilkar

Ready to see Kong in action?

Get a personalized walkthrough of Kong's platform tailored to your architecture, use cases, and scale requirements.

Get a Demo
Powering the API world

Increase developer productivity, security, and performance at scale with the unified platform for API management, AI gateways, service mesh, and ingress controller.

Sign up for Kong newsletter

    • Platform
    • Kong Konnect
    • Kong Gateway
    • Kong AI Gateway
    • Kong Insomnia
    • Developer Portal
    • Gateway Manager
    • Cloud Gateway
    • Get a Demo
    • Explore More
    • Open Banking API Solutions
    • API Governance Solutions
    • Istio API Gateway Integration
    • Kubernetes API Management
    • API Gateway: Build vs Buy
    • Kong vs Postman
    • Kong vs MuleSoft
    • Kong vs Apigee
    • Documentation
    • Kong Konnect Docs
    • Kong Gateway Docs
    • Kong Mesh Docs
    • Kong AI Gateway
    • Kong Insomnia Docs
    • Kong Plugin Hub
    • Open Source
    • Kong Gateway
    • Kuma
    • Insomnia
    • Kong Community
    • Company
    • About Kong
    • Customers
    • Careers
    • Press
    • Events
    • Contact
    • Pricing
  • Terms
  • Privacy
  • Trust and Compliance
  • © Kong Inc. 2025