Kong Ingress Bundled Plugin

Kong 1.3.0

I couldn’t get Correlation Plugin to work

request-id-plugin.yaml

apiVersion: configuration.konghq.com/v1
kind: KongPlugin
metadata:
  name: request-id
config:
  header_name: my-request-id
plugin: correlation-id

test-ingress.yaml

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
  name: demo-example-com
  annotations:
    plugins.konghq.com: request-id
spec:
  rules:
  - host: example.com
    http:
      paths:
      - path: /bar
        backend:
          serviceName: echo
          servicePort: 80

curl -i -H “Host: example.com” 172.19.108.10/bar/sample

HTTP/1.1 200 OK
Content-Type: text/plain; charset=UTF-8
Transfer-Encoding: chunked
Connection: keep-alive
Date: Tue, 27 Aug 2019 09:04:24 GMT
Server: echoserver
X-Kong-Upstream-Latency: 11
X-Kong-Proxy-Latency: 0
Via: kong/1.3.0



Hostname: echo-758859bbfb-sn95m

Pod Information:
	node name:	awsdikubl012-alphab.aws.seagate.com
	pod name:	echo-758859bbfb-sn95m
	pod namespace:	default
	pod IP:	10.244.2.63

Server values:
	server_version=nginx: 1.12.2 - lua: 10010

Request Information:
	client_address=10.244.2.71
	method=GET
	real path=/sample
	query=
	request_version=1.1
	request_scheme=http
	request_uri=http://example.com:8080/sample

Request Headers:
	accept=*/*
	connection=keep-alive
	host=example.com
	user-agent=curl/7.29.0
	x-forwarded-for=10.244.0.0
	x-forwarded-host=example.com
	x-forwarded-port=8000
	x-forwarded-proto=http
	x-real-ip=10.244.0.0

Request Body:
	-no body in request-

I couldn’t see my-request-id in the request header? Any clue?

Can you check the logs of the Ingress Controller and see if there are any errors?
Please make sure that the plugin and Ingress resource are in the same namespace.

Thanks. I’ve put both plugins and resource to default namespace and it works.


© 2018 Kong Inc.    Terms  •  Privacy  •  FAQ