This action can be used to set the Kuberentes context for Spectro Cloud clusters.
The action will retrieve the latest available Kubeconfig for the target K8s cluster and set the context as appropriate.
Action inputs | Description |
---|---|
host Host |
(Optional) Spectro Cloud API endpoint. Default points to the Spectro Cloud SaaS endpoint: api.spectrocloud.com |
username Username |
Spectro Cloud Username (e.g: user1@abc.com) |
password Password |
Spectro Cloud Password (e.g: superSecure1#) |
projectName Project Name |
Name of the project where the K8s cluster is running, e.g: Default |
clusterName Cluster Name |
Lookup the cluster via the name, e.g: cluster1 |
clusterTags Cluster Tags |
Lookup a cluster via tags, e.g: cicd -> hipster (see example) |
- uses: spectrocloud/k8s-set-context@v1
with:
host: {enter Spectro Cloud API Endpoint (optional)}
username: {enter user's Spectro Cloud Username}
password: {enter user's Spectro Cloud Password}
projectName: {enter Spectro Cloud Project Name}
clusterName: {enter Spectro Cloud K8s cluster name}
clusterTags: {enter Spectro Cloud K8s tags (see example below)}
id: setcontext
Please note that all input except host
are required. Either one of clusterName
or clusterTags
is required
The clusterTags
can be specified as a yaml string, e.g:
- uses: spectrocloud/k8s-set-context@v1
with:
clusterTags: |
cicd: hipster
dev: spectro__tag
... (other properties)
Refer to the Spectro Cloud Documentation for more information on how to retrieve the required properties.
Please file a GitHub issue for any support or questions regarding the integration.