Configuration Examples
A plugin which is not associated to any service, route, or consumer is
considered global, and will be run on every request. Read the
Plugin Reference and the Plugin Precedence
sections for more information.
The following examples provide some typical configurations for enabling
the ACME
plugin globally.
Admin API
Kubernetes
Declarative (YAML)
Make the following request:
curl -X POST http://localhost:8001/plugins/ \
--data "name=acme" \
--data "config.account_email=example@example.com"
Create a KongClusterPlugin
resource and label it as global:
apiVersion: configuration.konghq.com/v1
kind: KongClusterPlugin
metadata:
name: <global-acme>
annotations:
kubernetes.io/ingress.class: kong
labels:
global: "true"
config:
account_email: example@example.com
plugin: acme
Add a plugins
entry in the declarative
configuration file:
plugins:
- name: acme
config:
account_email: example@example.com