Skip to content

feat(gateway): Certificate reloads - #6644

Open
lmilan wants to merge 16 commits into
mainfrom
feat/tls-certificate-reloads
Open

feat(gateway): Certificate reloads#6644
lmilan wants to merge 16 commits into
mainfrom
feat/tls-certificate-reloads

Conversation

@lmilan

@lmilan lmilan commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Description

Fixes #2348

Preview Links

Checklist

  • Tested how-to docs. If not, note why here.
  • All pages contain metadata.
  • Any new docs link to existing docs.
  • All autogenerated instructions render correctly (API, decK, Konnect, Kong Manager).
  • Style guide (capitalized gateway entities, placeholder URLs) implemented correctly.
  • Every page has a description entry in frontmatter.
  • Add new pages to the product documentation index (if applicable).

@lmilan lmilan self-assigned this Aug 11, 2026
@lmilan
lmilan requested a review from a team as a code owner August 11, 2026 15:24
@netlify

netlify Bot commented Aug 11, 2026

Copy link
Copy Markdown

Deploy Preview for kongdeveloper ready!

Name Link
🔨 Latest commit a2a281c
🔍 Latest deploy log https://app.netlify.com/projects/kongdeveloper/deploys/6a7d9eb5512dac0008562cc6
😎 Deploy Preview https://deploy-preview-6644--kongdeveloper.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@cloudjumpercat cloudjumpercat left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mostly just nitpicks! The operator how to wasn't working for me, I think because Konnect auth is missing somewhere

{:.warning}
> Don't run `kong reload` in a pod. `kong reload` does pick up the new value, and it does so without dropping connections, but it changes only the container that you ran it in. That container no longer matches its manifest, the other replicas are untouched, and the change is lost the next time the pod is rescheduled, scaled, or upgraded.
>
> Replacing the pods keeps the change in the manifest, where it survives all of those events. To avoid the gap in service that a rolling restart causes, run more than one replica with readiness probes configured, rather than using `kong reload`.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
> Replacing the pods keeps the change in the manifest, where it survives all of those events. To avoid the gap in service that a rolling restart causes, run more than one replica with readiness probes configured, rather than using `kong reload`.
> Replacing the pods keeps the change in the manifest, where it survives all of those events. To avoid the gap in service that a rolling restart causes, run more than one replica with readiness probes configured instead of using `kong reload`.


## Restart the data plane without a template change

Not every change edits the pod template. When a `kong.conf` parameter points at a file and something outside Helm rewrites that file, the Deployment spec is byte-for-byte identical, so `helm upgrade` has nothing to replace and the pods keep running with the old contents loaded. A rotated Secret is the common case.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Not every change edits the pod template. When a `kong.conf` parameter points at a file and something outside Helm rewrites that file, the Deployment spec is byte-for-byte identical, so `helm upgrade` has nothing to replace and the pods keep running with the old contents loaded. A rotated Secret is the common case.
Not every change edits the pod template. When a `kong.conf` parameter points at a file and something outside Helm rewrites that file, the deployment spec is byte-for-byte identical, so `helm upgrade` has nothing to replace and the pods keep running with the old contents loaded. A rotated Secret is the common case.

"Deployment" just felt odd to be capped.


`kubectl rollout restart` is how you replace the pods in that situation. Run it here against the data plane you just upgraded, so you can see what it does before you need it for a rotation:

1. Record the current pod names and ages so we can compare afterwards:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
1. Record the current pod names and ages so we can compare afterwards:
1. Record the current pod names and ages so you can compare afterwards:

kubectl get pods -n kong -l app.kubernetes.io/instance=kong-dp
```

1. Trigger a rolling restart of the Deployment:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
1. Trigger a rolling restart of the Deployment:
1. Trigger a rolling restart of the deployment:


Not every change edits the pod template. When a `kong.conf` parameter points at a file and something outside Helm rewrites that file, the Deployment spec is byte-for-byte identical, so `helm upgrade` has nothing to replace and the pods keep running with the old contents loaded. A rotated Secret is the common case.

`kubectl rollout restart` is how you replace the pods in that situation. Run it here against the data plane you just upgraded, so you can see what it does before you need it for a rotation:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
`kubectl rollout restart` is how you replace the pods in that situation. Run it here against the data plane you just upgraded, so you can see what it does before you need it for a rotation:
Use `kubectl rollout restart` to replace the pods in this situation. Run it here against the data plane you just upgraded, so you can see what it does before you need it for a rotation:

Just so it feels a bit more active.

The two serial numbers should now match. {{site.base_gateway}} is serving the rotated certificate.

{:.warning}
> Reloader restarts the whole Deployment, so every `kong.conf` value is re-read, not just the certificate. Roll out configuration changes deliberately, and keep at least two replicas so a rotation doesn't take your data plane offline. With a single replica, as in this guide, expect a gap in service while the pod is replaced.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
> Reloader restarts the whole Deployment, so every `kong.conf` value is re-read, not just the certificate. Roll out configuration changes deliberately, and keep at least two replicas so a rotation doesn't take your data plane offline. With a single replica, as in this guide, expect a gap in service while the pod is replaced.
> Reloader restarts the whole deployment, so every `kong.conf` value is re-read, not just the certificate. Roll out configuration changes deliberately, and keep at least two replicas so a rotation doesn't take your data plane offline. If you're using a single replica, like in this guide, expect a gap in service while the pod is replaced.

{:.warning}
> Reloader restarts the whole Deployment, so every `kong.conf` value is re-read, not just the certificate. Roll out configuration changes deliberately, and keep at least two replicas so a rotation doesn't take your data plane offline. With a single replica, as in this guide, expect a gap in service while the pod is replaced.

Reloader triggers the rollout by patching an environment variable into the pod template, so you'll see a `STAKATER_` variable on the Deployment that isn't in your values file. It's reset by your next `helm upgrade`, and Reloader adds it again on the following rotation.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Reloader triggers the rollout by patching an environment variable into the pod template, so you'll see a `STAKATER_` variable on the Deployment that isn't in your values file. It's reset by your next `helm upgrade`, and Reloader adds it again on the following rotation.
Reloader triggers the rollout by patching an environment variable into the pod template, so you'll see a `STAKATER_` variable on the deployment that isn't in your values file. It's reset by your next `helm upgrade`, and Reloader adds it again on the following rotation.

indent: 3
{% endon_prem %}

{% konnect %}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one feels awkward with the previous step of "Add your Kong Gateway Enterprise license:". Can we conditionally render the whole step so it only shows for on prem and Konnect users just won't see this step?


Deploy a sample `HTTPRoute` to verify that TLS termination is working:

```sh

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What did you get when you tested this with Konnect? Mine is giving me this error, and I suspect it's because we need some sort of step added to authenticate with Konnect because I didn't pass my PAT anywhere yet:

Error from server: error when creating "STDIN": admission webhook "gwapi.validations.kong.konghq.com" denied the request: Unable to validate HTTPRoute schema: HTTP status 403 (message: "Enterprise license missing or expired")

Comment on lines +208 to +209
* In traditional mode they come from the database
* In DB-less mode they arrive with the declarative configuration

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* In traditional mode they come from the database
* In DB-less mode they arrive with the declarative configuration
* In traditional mode, they come from the database
* In DB-less mode, they come with the declarative configuration

"arrive" just felt too much like personification

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TLS Certificate reloads with Gateway

3 participants