$30 off During Our Annual Pro Sale. View Details »

Controlling Your Kong Gateway With decK and CI/CD

Michael Heap
September 28, 2021

Controlling Your Kong Gateway With decK and CI/CD

We used to configure services by hand, then came tools such as Puppet, Chef and Ansible. Then we used to build infrastructure by hand, and we got tools like Terraform and Pulumi. So why are we still configuring routes and plugins in Kong manually?

This session will introduce you to Kong’s declarative configuration capabilities and how to use your CI system to lint and apply these configurations in a variety of environments. Test your changes in a staging environment, then apply exactly the same config to production with a click of a button.

Michael Heap

September 28, 2021
Tweet

More Decks by Michael Heap

Other Decks in Technology

Transcript

  1. Michael Heap
    Director of Developer Relations,
    Kong
    Controlling your
    Kong Gateway with
    decK and CI/CD

    View Slide

  2. “What do you mean production
    is down? It was only a config
    change”

    View Slide

  3. ● Developer Relations at Kong
    ● Wrote a book on configuration
    change management with Ansible
    ● Has still broken production with a
    configuration change
    I’m Michael

    View Slide

  4. Today’s Plan
    1. Introduce decK
    2. Configure a new Kong Gateway instance
    3. Back up our Gateway config using decK
    4. Change our plugin configuration and
    apply the change with decK
    5. Build a CI/CD flow to automatically
    apply those changes
    Basics
    6. Manual review using environments and
    deck-diff
    7. Distributed configuration (teams
    manage their own 🥳)
    8. From zero to running gateway using
    declarative configuration
    Advanced Usage

    View Slide

  5. 1
    Configuration management and drift
    detection for Kong
    Introducing decK

    View Slide

  6. Features
    decK
    Export
    Backup an existing Gateway
    to a declarative configuration
    file
    Import
    Populate Kong’s database
    from a configuration file
    Diff
    Visualise the difference
    between your configuration
    and the current Gateway
    state
    Validate
    Ensure that your
    configuration file is valid and
    will apply cleanly to your
    Gateway
    Distributed Config
    Merge service definitions
    from multiple sources to
    build a single source of truth
    Automate
    decK is designed to be run
    as part of your CI system

    View Slide

  7. View Slide

  8. 2 Configuring
    Kong Gateway

    View Slide

  9. 3 Creating backups
    with decK

    View Slide

  10. 4 Applying changes
    declaratively

    View Slide

  11. 5 Using decK with CI/CD

    View Slide

  12. Today’s Plan
    1. Introduce decK ✅
    2. Configure a new Kong Gateway instance

    3. Back up our Gateway config using decK

    4. Change our plugin configuration and
    apply the change with decK ✅
    5. Build a CI/CD flow to automatically
    apply those changes ✅
    Basics
    6. Manual review using environments and
    deck-diff
    7. Distributed configuration (teams
    manage their own 🥳)
    8. From zero to running gateway using
    declarative configuration
    Advanced Usage

    View Slide

  13. 6 Reviewing changes

    View Slide

  14. 7 Distributed Configuration

    View Slide

  15. 8 From zero to running

    View Slide

  16. One More Thing
    decK also works
    with Kong Konnect

    View Slide

  17. Thank you!
    Michael Heap
    [email protected]

    View Slide