Skip to content
anchor

GitHub Action

Spectro Cloud Kubernetes

v1 Latest version

Spectro Cloud Kubernetes

anchor

Spectro Cloud Kubernetes

Set Kubernetes kubeconfig context for Spectro Cloud Kubernetes (K8s) Platform as a Service clusters

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Spectro Cloud Kubernetes

uses: spectrocloud/k8s-set-context@v1

Learn more about this action in spectrocloud/k8s-set-context

Choose a version

typescript-action status

Spectro Cloud Kubernetes

Spectro Cloud

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

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)

Example usage

- 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)

Support

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.