Skip to content

Commit 1c90a1a

Browse files
authored
Merge branch 'main' into fix/ai-gateway
2 parents b106ccf + aaf38f3 commit 1c90a1a

File tree

1 file changed

+60
-1
lines changed

1 file changed

+60
-1
lines changed

app/_how-tos/operator-konnect-getstarted-authentication.md

Lines changed: 60 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,23 @@ prereqs:
3535

3636
## Create a `KonnectAPIAuthConfiguration` object
3737

38-
Depending on your preferences, you can create a `KonnectAPIAuthConfiguration` object with the token specified directly in the spec or as a reference to a Kubernetes Secret. In the CRD, the `serverURL` should be set to the {{site.konnect_short_name}} API url in the region where your account is located.
38+
`KonnectAPIAuthConfiguration` serves as the container for the authentication credentials
39+
required to connect your Kubernetes cluster to {{ site.konnect_short_name }}.
3940

41+
It can store either:
42+
43+
- A Personal Access Token
44+
- A System Account Access Token
45+
46+
Depending on your preferences, you can either:
47+
48+
- Create a `KonnectAPIAuthConfiguration` object with the token specified directly in the spec and use RBAC to restrict access to its type.
49+
- Use a Kubernetes `Secret` of type `Opaque` and reference it from the `KonnectAPIAuthConfiguration` object.
50+
The token has to be specified in `Secret`'s `token` data field.
51+
52+
The `serverURL` should be set to the {{site.konnect_short_name}} API url in the region where your account is located.
53+
54+
### Using a token in `KonnectAPIAuthConfiguration`
4055

4156
<!-- vale off -->
4257
{% konnect_crd %}
@@ -50,6 +65,32 @@ spec:
5065
{% endkonnect_crd %}
5166
<!-- vale on -->
5267

68+
### Using a Secret reference
69+
70+
```sh
71+
echo 'apiVersion: v1
72+
kind: Secret
73+
metadata:
74+
name: konnect-api-auth-secret
75+
namespace: kong
76+
labels:
77+
konghq.com/credential: konnect
78+
stringData:
79+
token: "'$KONNECT_TOKEN'"' | kubectl apply -f -
80+
```
81+
82+
<!-- vale off -->
83+
{% konnect_crd %}
84+
kind: KonnectAPIAuthConfiguration
85+
metadata:
86+
name: konnect-api-auth
87+
spec:
88+
type: secretRef
89+
secretRef:
90+
name: konnect-api-auth-secret
91+
serverURL: us.api.konghq.com
92+
{% endkonnect_crd %}
93+
<!-- vale on -->
5394

5495
## Validate
5596

@@ -59,3 +100,21 @@ Run the following command to verify that the authentication configuration was cr
59100
kubectl get konnectapiauthconfiguration konnect-api-auth -n kong
60101
```
61102

103+
You should see output similar to the following:
104+
105+
```bash
106+
NAME VALID ORGID SERVERURL
107+
konnect-api-auth True 5ca26716-02f7-4430-9117-1d1a7a2695e7 https://us.api.konghq.com
108+
```
109+
110+
If you prefer to work with status conditions programmatically, you can also run:
111+
112+
```bash
113+
kubectl get konnectapiauthconfiguration konnect-api-auth -n kong -o jsonpath="{.status.conditions[?(@.type=='APIAuthValid')]}"
114+
```
115+
116+
Which should yield the follow
117+
118+
```json
119+
{"lastTransitionTime":"2025-10-16T11:46:28Z","message":"Token is valid","observedGeneration":1,"reason":"Valid","status":"True","type":"APIAuthValid"}
120+
```

0 commit comments

Comments
 (0)