Skip to content

Instantly share code, notes, and snippets.

@eqmcc
Last active July 16, 2021 19:55
Show Gist options
  • Save eqmcc/8616fe520ddf5903adb65312dcc60f4f to your computer and use it in GitHub Desktop.
Save eqmcc/8616fe520ddf5903adb65312dcc60f4f to your computer and use it in GitHub Desktop.
the yaml
apiVersion: configuration.konghq.com/v1
kind: KongConsumer
metadata:
name: consumer1
namespace: nginx-kong-test
username: consumer1
---
apiVersion: configuration.konghq.com/v1
kind: KongConsumer
metadata:
name: consumer2
namespace: nginx-kong-test
username: consumer2
---
apiVersion: configuration.konghq.com/v1
kind: KongCredential
metadata:
name: credential1
namespace: nginx-kong-test
consumerRef: consumer1
type: key-auth
config:
key: "111"
---
apiVersion: configuration.konghq.com/v1
kind: KongCredential
metadata:
name: credential2
namespace: nginx-kong-test
consumerRef: consumer2
type: key-auth
config:
key: "222"
---
apiVersion: configuration.konghq.com/v1
kind: KongPlugin
metadata:
name: key-auth-consumer1
namespace: nginx-kong-test
disabled: false
consumerRef: consumer1
plugin: key-auth
config:
hide_credentials: true
---
apiVersion: configuration.konghq.com/v1
kind: KongPlugin
metadata:
name: key-auth-consumer2
namespace: nginx-kong-test
disabled: false
consumerRef: consumer2
plugin: key-auth
config:
hide_credentials: true
---
apiVersion: configuration.konghq.com/v1
kind: KongPlugin
metadata:
name: rl-consumer1
namespace: nginx-kong-test
enabled: true
consumerRef: consumer1
config:
second: 1
plugin: rate-limiting
---
apiVersion: configuration.konghq.com/v1
kind: KongPlugin
metadata:
name: rl-consumer2
namespace: nginx-kong-test
enabled: true
consumerRef: consumer2
config:
second: 10
plugin: rate-limiting
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment