Skip to content
You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
terminal

GitHub Action

kubectl command line tool for github actions

1.0.1

kubectl command line tool for github actions

terminal

kubectl command line tool for github actions

Kubectl command for github action

Installation

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

              

- name: kubectl command line tool for github actions

uses: cube-root/[email protected]

Learn more about this action in cube-root/kubectl

Choose a version

kubectl


Kubernetes, also known as K8s, is an open source system for managing [containerized applications] across multiple hosts. It provides basic mechanisms for the deployment, maintenance, and scaling of applications.

GitHub Action for interacting with kubectl (k8s)

Usage

To use kubectl put this step into your workflow:

- uses: cube-root/kubectl
  env:
    KUBE_CONFIG: ${{ secrets.KUBE_CONFIG }}
  run: |
    kubectl get pods && kubectl get deploy

KUBE_CONFIG is the base64 of config file as follows. To create the file use the reference

apiVersion: v1
current-context: {context-name}
kind: Config
clusters:
- cluster:
    certificate-authority-data: {cluster-ca}
    server: {server-dns}
  name: {cluster-name}
contexts:
- context:
    cluster: {cluster-name}
    user: {user-name}
  name: {context-name}

users:
- name: {user-name}
  user:
    token: {secret-token}