You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: app/_how-tos/operator-konnect-getstarted-authentication.md
+60-1Lines changed: 60 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -35,8 +35,23 @@ prereqs:
35
35
36
36
## Create a `KonnectAPIAuthConfiguration` object
37
37
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 }}.
39
40
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`
40
55
41
56
<!-- vale off -->
42
57
{% konnect_crd %}
@@ -50,6 +65,32 @@ spec:
50
65
{% endkonnect_crd %}
51
66
<!-- vale on -->
52
67
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 -->
53
94
54
95
## Validate
55
96
@@ -59,3 +100,21 @@ Run the following command to verify that the authentication configuration was cr
59
100
kubectl get konnectapiauthconfiguration konnect-api-auth -n kong
0 commit comments