# Kong Jwt Kuberentes

**URL:** <https://discuss.konghq.com/t/kong-jwt-kuberentes/8110>\
**Category:** Questions\
**Tags:** kubernetes\
**Created:** [March 25, 2021, 5:03pm UTC](https://discuss.konghq.com/t/kong-jwt-kuberentes/8110 "2021-03-25T17:03:35Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sachin\_Maharana](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.konghq.com/sachin_maharana/32/2663_2.png) [@Sachin\_Maharana](https://discuss.konghq.com/u/Sachin_Maharana)\
**Post date:** [March 25, 2021, 5:03pm UTC](https://discuss.konghq.com/t/kong-jwt-kuberentes/8110/1 "2021-03-25T17:03:35Z")

</div>

Hi. I am having a hard time to figure out how to make jwt work with kong kubernetes.  
This is how installed kong.

```auto
kubectl apply -f https://bit.ly/k4k8s

```

```auto
apiVersion: configuration.konghq.com/v1
kind: KongPlugin
metadata:
  name: app-jwt
config:
  key_claim_name: kid
  claims_to_verify: 
    - exp
plugin: jwt

```

```auto
apiVersion: configuration.konghq.com/v1
kind: KongConsumer
metadata:
  name: admin
  annotations:
    kubernetes.io/ingress.class: kong
username: admin
credentials:
  - app-secret

```

```auto
apiVersion: v1
kind: Secret
metadata:
  name: app-secret
type: Opaque
data:
  kongCredType: and0
  key: YWRtaW4K
  algorithm: UlMyNTY=
  rsa_public_key: |
    LS0tLS1CRUdJTiBSU0EgUFVCTElDIEtFWS0tLS0tCk1JSUNDZ0tDQWdFQTJsTmlTUFhwL0ZBTi9rTFhSUlI2bHgrOG5kdzgrYmk4SzRuMFZJdVpIcmxwbERTbmdxYUMKYzJtSlFqajVRdytZS2VEdExQVUVlY1VtUTRMRmxISXdXZkgxZVk4c0MzSDBUaTNjNzFMZjJYbTRadnc0d3pQVwpEY0dzWFBHS0c1dC8wUTFBZFVjMHA1YzZtVC9XUFhzbTdPcnRmekRIM0I2ckJvaFhIc21jSjFBOTZaN0lqNWY5CnhSMS83RlNkdjMxd1VFK0pCR3RtR0VvK0gzTDI1RUJ1RmN4eVUrbFlBK0hSellSL0lmWitRcVdZS25OOVRnUGMKKzVXdDQ2aUtScUo0WEFIYWtXQmJrYjZTK3FFMWI3QlpLYU10Rnc1RXU5djg3NTFReGJrQ3IrdktyME8zbjhGTQpXVGdvMmRmNW5oNktlTWp3bUhMYWhEcFNKZ2xDd0duWU1LOFNwQUw5UG9pMjNFdngybjFJaHZvR3hjc0h4ZFZmClhoOFVyZGVETi85d3l6U2ZCTGg5azBkZXRYUi9yK244ejVWOGNkQUVvZmZud3BXR1lIUSs0cWVjNVNjdlJMU2YKODRydTExNGVWK29SQm4xOVM3ekhKOWFlYUhWWTJqd0ozK0prTjE2NUdSaWVZb3hCRW1zNktEaTAvbCtoRVlkZgo5WFFBRzJnNFpxem1Xdm12d1FZdXZoNDRHb1JNZllzdUJNQ2MwWFNxTm9XZFFmZHZoN1Nicy9uaUhVekZUOENrCnh0bHFHM1lHTUZscDg1aW41YTNlcW1LSmVtZEdlbnFOSFByYVVrWldjdWF1MTYweUtSNVpHWWJIVGhNY3JicFEKZC9yMGNsZVBFbGtpWWNPQUtnb2p6YWE2cUszenA3WDljbTJEWU0vV1BzSDB2OExEb3ZDTXdRY0NBd0VBQVE9PQotLS0tLUVORCBSU0EgUFVCTElDIEtFWS0tLS0tCgo=

```

```auto
jet payload
{
  "sub": "1234567890",
  "name": "John Doe",
  "admin": true,
  "iat": 1516239022,
  "exp": 1900000000,
  "kid": "admin"
}
header
{
  "alg": "RS256",
  "typ": "JWT",
  "kid": "admin"
}

```

So even after all this, i get  
curl -i -H “Authorization: Bearer ${ADMIN\_JWT}” $PROXY\_IP/get

```auto
{"message":"No credentials found for given 'kid'"}% 

```

Where i might be going wrong?

---

<div class="post-metadata">

**Author:** ![narate](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.konghq.com/narate/32/1778_2.png) [@narate](https://discuss.konghq.com/u/narate)\
**Post date:** [March 26, 2021, 3:45am UTC](https://discuss.konghq.com/t/kong-jwt-kuberentes/8110/2 "2021-03-26T03:45:06Z")

</div>

> [@Sachin\_Maharana](#):
>
> `"kid": "admin"`

change to

```auto
"kid": "YWRtaW4K"

```

---

<div class="post-metadata">

**Author:** ![thatbenguy](https://avatars.discourse-cdn.com/v4/letter/t/77aa72/32.png) [@thatbenguy](https://discuss.konghq.com/u/thatbenguy)\
**Post date:** [February 14, 2022, 5:43pm UTC](https://discuss.konghq.com/t/kong-jwt-kuberentes/8110/3 "2022-02-14T17:43:19Z")

</div>

I don’t think this is correct. the “kid” field in the secret should be `admin` but base64 encoded which is `YWRtaW4K`

Curious if this worked?
