Create API Authentication
    
        Uses: 
    
    
    
        
        
        
            
            
            Kong Gateway Operator
        
    
    
    
    
    
    
        
        
    Incompatible with
  
    
      on-prem
    
  
Related Documentation
  
    TL;DR
    
Define a KonnectAPIAuthConfiguration to provide credentials and a KonnectExtension to connect your cluster to a Konnect Control Plane.
Prerequisites
Series Prerequisites
This page is part of the Get Started with the Kong Gateway Operator series.
Complete the previous page, Install Kong Operator before completing this page.
Create a KonnectAPIAuthConfiguration object
            
          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 Konnect API url in the region where your account is located.
echo '
kind: KonnectAPIAuthConfiguration
apiVersion: konnect.konghq.com/v1alpha1
metadata:
  name: konnect-api-auth
  namespace: kong
spec:
  type: token
  token: "'$KONNECT_TOKEN'"
  serverURL: us.api.konghq.com
' | kubectl apply -f -
Copied!
Validate
Run the following command to verify that the authentication configuration was created successfully:
kubectl get konnectapiauthconfiguration konnect-api-auth -n kong
Copied!