Direct Cluster Endpoint Token
Direct Cluster Endpoints are a feature to avoid the central Loft instance and directly connect to a connected Loft cluster.
Example Direct Cluster Endpoint Token
An example Direct Cluster Endpoint Token:
apiVersion: management.loft.sh/v1
kind: DirectClusterEndpointToken
metadata:
creationTimestamp: null
spec: {}
status:
token: eyJhbGciOiJSUzI1NiIsImtpZCI6IjV3RlZOcmU1Ty1ZazBMRmNoN3F1NzVlYlctdk5rdGJ5eTRlelJNQ3dKLVEifQ.eyJhdWQiOlsiaHR0cHM6V0ZXMuZGVmYXVsdCJdLCJleHAiOjE5ODMwNzXIubG...
Direct Cluster Endpoint Token Reference
kind
required string
Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to.
Cannot be updated.
In CamelCase.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
kind
required string apiVersion
required string
APIVersion defines the versioned schema of this representation of an object.
Servers should convert recognized schemas to the latest internal value, and
may reject unrecognized values.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
apiVersion
required string metadata
required object
metadata
required object spec
required object
spec
required object status
required object
status
required object Create: Direct Cluster Endpoint Token
You can either use curl or kubectl to create a new Direct Cluster Endpoint Token.
- kubectl
- curl
Create a file object.yaml
with the following contents:
apiVersion: management.loft.sh/v1
kind: DirectClusterEndpointToken
metadata:
creationTimestamp: null
spec: {}
status:
token: eyJhbGciOiJSUzI1NiIsImtpZCI6IjV3RlZOcmU1Ty1ZazBMRmNoN3F1NzVlYlctdk5rdGJ5eTRlelJNQ3dKLVEifQ.eyJhdWQiOlsiaHR0cHM6V0ZXMuZGVmYXVsdCJdLCJleHAiOjE5ODMwNzXIubG...
Then create the Direct Cluster Endpoint Token my-object
with:
kubectl create -f object.yaml
Create a file object.yaml
with the following contents:
apiVersion: management.loft.sh/v1
kind: DirectClusterEndpointToken
metadata:
creationTimestamp: null
spec: {}
status:
token: eyJhbGciOiJSUzI1NiIsImtpZCI6IjV3RlZOcmU1Ty1ZazBMRmNoN3F1NzVlYlctdk5rdGJ5eTRlelJNQ3dKLVEifQ.eyJhdWQiOlsiaHR0cHM6V0ZXMuZGVmYXVsdCJdLCJleHAiOjE5ODMwNzXIubG...
Run the following curl command to create a new Direct Cluster Endpoint Token my-object
:
curl -s -X POST --insecure \
"https://$LOFT_DOMAIN/kubernetes/management/apis/management.loft.sh/v1/directclusterendpointtokens" \
--data-binary "$(cat object.yaml)" \
-H "Content-Type: application/yaml" \
-H "Authorization: Bearer $ACCESS_KEY"