I am new for Kong API and doing POC for basic-auth plugin but getting exception, please help to resolve. The basic auth plugin working with the kong ingress controller. This is my current setup:
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: demo.yolo42.com
annotations:
kubernetes.io/ingress.class: kong
konghq.com/plugins: basic-auth-example
spec:
rules:
- host: demo.yolo42.com
- http:
paths:
- path: /foo
backend:
serviceName: echo
servicePort: 80
---
apiVersion: configuration.konghq.com/v1
kind: KongPlugin
metadata:
name: basic-auth-example
config:
hide_credentials: true
plugin: basic-auth
---
apiVersion: configuration.konghq.com/v1
kind: KongConsumer
metadata:
name: test
annotations:
kubernetes.io/ingress.class: kong
username: "xyz"
credentials:
- user-key
---
apiVersion: v1
kind: Secret
metadata:
name: user-key
stringData:
kongCredType: basic-auth
password: "XXXX"