Retrieve Kube Config (Ingress)
If ingress endpoint is configured for the virtual cluster, you can retrieve the kube config for the virtual cluster through this endpoint
Virtual Cluster Kube Config example​
An example Virtual Cluster Kube Config:
apiVersion: management.loft.sh/v1
kind: VirtualClusterInstanceKubeConfig
metadata:
creationTimestamp: null
namespace: your-namespace
spec: {}
status:
kubeConfig: |-
apiVersion: v1
kind: Config
clusters:
- cluster:
...
Virtual Cluster Kube Config reference​
spec
required object pro​
spec
required object pro​status
required object pro​
status
required object pro​Virtual Cluster Kube Config (Create)​
- curl
Create a file object.yaml
with the following contents:
apiVersion: management.loft.sh/v1
kind: VirtualClusterInstanceKubeConfig
metadata:
creationTimestamp: null
namespace: your-namespace
spec: {}
status:
kubeConfig: |-
apiVersion: v1
kind: Config
clusters:
- cluster:
...
Then run the following curl command:
# Exchange my-object in the url below with the name of the Virtual Cluster Kube Config
curl -s -X POST --insecure \
"https://$LOFT_DOMAIN/kubernetes/management/apis/management.loft.sh/v1/namespaces/your-namespace/virtualclusterinstances/my-object/kubeconfig" \
--data-binary "$(cat object.yaml)" \
-H "Content-Type: application/yaml" \
-H "Authorization: Bearer $ACCESS_KEY"