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
  • 1.19.x (latest)
  • 1.18.x
  • 1.17.x
  • 1.16.x
  • 1.15.x
  • 1.14.x
  • 1.13.x
  • 1.12.x
  • 1.11.x
  • 1.10.x
  • 1.9.x
  • 1.8.x
  • 1.7.x
  • pre-1.7
    • Terminology
    • Architecture
    • Compatibility Promise
    • Getting Started with decK
    • Backup and Restore
    • Upgrade to Kong Gateway 3.x
    • Configuration as Code and GitOps
    • Distributed Configuration
    • Best Practices
    • Using decK with Kong Gateway (Enterprise)
    • Using decK with Konnect
    • Run decK with Docker
    • Using Multiple Files to Store Configuration
    • De-duplicate Plugin Configuration
    • Set Up Object Defaults
      • Overview
      • Secret Management with decK
      • Using Environment Variables with decK
    • Entities Managed by decK
      • deck completion
      • deck convert
      • deck diff
      • deck dump
      • deck ping
      • deck reset
      • deck sync
      • deck validate
      • deck version

github-edit-pageEdit this page

report-issueReport an issue

enterprise-switcher-iconSwitch to OSS

decK
1.17.x
  • Home
  • decK
  • Guides
  • Best Practices
  • Best Practices when using decK
You are browsing documentation for an outdated version. See the latest documentation here.

Best Practices when using decK

  • Always ensure that you have one decK process running at any time. Multiple processes step on each other and can corrupt Kong’s configuration.
  • Do not mix up decK’s declarative configuration with cURL or any other script. Either manage the configuration with decK or manage it with your homegrown script. Mixing the two on the same dataset is cumbersome and error-prone.
  • If you have a very large installation, you can split out your configuration into smaller subsets. You can find more info for it in the guide to practicing distributed configuration.
  • Always use a pinned version of decK and Kong. Use a specific version of decK in production to achieve declarative configuration. If you upgrade to a new version of decK or Kong, please safely test the changes in a staging environment first.
  • decK does not manage encryption of sensitive information. The state file stores the private keys of your certificates and credentials of consumers in plaintext. Be careful in how and where you store this file to avoid any security breaches. Always store the sensitive information in an encrypted form and provide a plaintext version of it on a need-only basis.
  • If you have many consumers in your database, do not export or manage them using decK. Declarative configuration is only meant for entity configuration. It is not meant for end-user data, which can easily grow into hundreds of thousands or millions of records.
  • Always run a deck diff command before running a deck sync to ensure that the change is correct.
  • Adopt a CI-driven configuration practice.
  • Always secure Kong’s Admin API with a reliable authentication method.
  • Do not write the state file by hand to avoid errors. Use Kong’s Admin API to configure Kong for the first time, then export the configuration to a declarative configuration file. Any subsequent changes should be made by manually editing the file and pushing the change via CI. If you’re making a larger change, make the change in Kong first, then export the new file. Then you can diff the two state files to review the changes being made.
  • Configure a cronjob to run deck diff periodically to ensure that Kong’s database is in sync with the state file checking into your Git repositories. Trigger an alert if decK detects a drift in the configuration.
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