Skip to content

Instantly share code, notes, and snippets.

_format_version: "1.1"
upstreams:
- name: foo-1
targets:
- target: 10.1.2.1
- target: 10.2.12.2
- name: foo-2
targets:
- target: 10.1.2.1
- target: 10.2.12.2
{
"name": "rate-limiting",
"config": {
"day": null,
"fault_tolerant": true,
"hide_client_headers": false,
"hour": null,
"limit_by": "consumer",
"minute": 10,
"month": null,
@hbagdi
hbagdi / kong.json
Created April 28, 2020 16:42
For a bug report
{
"_format_version": "1.1",
"consumers": [
{
"username": "yolo",
"tags": [
"internal-user"
],
"plugins": [
{
{
"_format_version": "1.1",
"services": [
{
"connect_timeout": 60000,
"host": "mockbin.org",
"name": "svc1",
"port": 80,
"protocol": "http",
"read_timeout": 60000,
@hbagdi
hbagdi / values.yaml
Created March 31, 2020 17:58
Kong Enterprise on Kubernetes
image:
repository: kong-docker-kong-enterprise-edition-docker.bintray.io/kong-enterprise-edition
tag: "1.3.0.2-alpine"
pullSecrets:
- kong-enterprise-docker
ingressController:
enabled: false
env:
password:
valueFrom:
podAnnotations:
prometheus.io/scrape: "true" # Ask Prometheus to scrape the
prometheus.io/port: "9542" # Kong pods for metrics
apiVersion: apps/v1
kind: Deployment
metadata:
name: tcp-echo
labels:
app: tcp-echo
spec:
replicas: 1
selector:
matchLabels:
apiVersion: v1
kind: Service
metadata:
labels:
app: echo
name: echo
spec:
ports:
- port: 8080
name: high
@hbagdi
hbagdi / k4k8s-demo.md
Last active January 10, 2022 00:52
A demo guide to demo some features of Kong for Kubernetes

Kong for Kubernetes demo

This demo guide demos the following:

  • gRPC proxy
  • plugins on gRPC proxy
  • http proxy with multiple plugins
  • KongConsumer resource
  • Encrypted credentials via Secret resource in k8s
  • Fine-grained rate-limits
@hbagdi
hbagdi / kong-service.yaml
Created January 6, 2020 21:21
Gist for upstream kubernetes bug report for IP-tables bug
apiVersion: v1
kind: Service
metadata:
name: kong-proxy
namespace: kong
spec:
externalTrafficPolicy: Cluster
ports:
- name: proxy
port: 80