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

GitHub Action

Setup kubectl and plugins

v0.2.0

Setup kubectl and plugins

package

Setup kubectl and plugins

Install a specific version of kubectl and plugins via krew

Installation

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

              

- name: Setup kubectl and plugins

uses: marcofranssen/setup-kubectl@v0.2.0

Learn more about this action in marcofranssen/setup-kubectl

Choose a version

Setup kubectl

This Github action installs kubectl and allows to optionally also install krew to manage kubectl plugins. You can also choose to pre-install a bunch of kubectl plugins by default.

Usage

Install stable

Installs the latest stable release.

steps:
  - uses: marcofranssen/setup-kubectl@v0.1.0
    id: kubectl
  - run: echo ${{ steps.kubectl.output.kubectl-version }}

Install latest

Installs the latest release.

steps:
  - uses: marcofranssen/setup-kubectl@v0.1.0
    id: kubectl
    with:
      kubectl-version: latest
  - run: echo ${{ steps.kubectl.output.kubectl-version }}

Install specific version

Installs the v1.24.4 release.

steps:
  - uses: marcofranssen/setup-kubectl@v0.1.0
    id: kubectl
    with:
      kubectl-version: v1.24.4

Install krew

Install krew allong with kubectl.

steps:
  - uses: marcofranssen/setup-kubectl@v0.1.0
    with:
      enable-plugins: true
  - run: echo ${{ steps.kubectl.output.krew-version }}
  - run: kubectl krew install aws-auth