logo

nscloud-cluster-action

namespacelabs/nscloud-cluster-action is a GitHub action that creates an Ephemeral Kubernetes Cluster. It also downloads and configures kubectl to grant access to the new cluster.

Prerequisites

In order to use nscloud-cluster-action, you need to have access to Namespace. The easiest way to ensure access is to run namespacelabs/nscloud-setup beforehand.

Example

jobs:
  deploy:
    name: Ephemeral cluster
    runs-on: ubuntu-latest
    # These permissions are needed to interact with GitHub's OIDC Token endpoint.
    permissions:
      id-token: write
      contents: read
    steps:
      - uses: actions/checkout@v3
      - uses: namespacelabs/nscloud-setup@v0
      - name: Create a Namespace cluster
        uses: namespacelabs/nscloud-cluster-action@v0
      - name: Apply configurations
        run: |
          kubectl apply -f foo/bar.yaml

Options

preview

If set to true, the cluster created will not be destroyed at the end. The default is false.

wait-kube-system

If set to true, wait for coredns and local-path-provisioner to be ready. The default is false.

Outputs

registry-address

Endpoint address of your workspace's private Namespace Container Registry.