Skip to content

Latest commit

 

History

History
73 lines (55 loc) · 1.72 KB

README.md

File metadata and controls

73 lines (55 loc) · 1.72 KB

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/[email protected]
    id: kubectl
  - run: echo ${{ steps.kubectl.output.kubectl-version }}

Install latest

Installs the latest release.

steps:
  - uses: marcofranssen/[email protected]
    id: kubectl
    with:
      kubectl-version: latest
  - run: echo ${{ steps.kubectl.output.kubectl-version }}

Install specific version

Installs the v1.24.5 release.

steps:
  - uses: marcofranssen/[email protected]
    id: kubectl
    with:
      kubectl-version: v1.24.5

Install krew

Install krew allong with kubectl.

steps:
  - uses: marcofranssen/[email protected]
    with:
      enable-plugins: true
  - run: echo ${{ steps.kubectl.output.krew-version }}
  - run: kubectl krew install aws-auth

Install plugins

Install krew allong with kubectl and some plugins.

steps:
  - uses: marcofranssen/[email protected]
    with:
      enable-plugins: true
      plugins: aws-auth,grep
  - run: echo ${{ steps.kubectl.output.krew-version }}
  - run: echo ${{ fromJson(steps.kubectl.output.krew-plugins) }}
  - run: kubectl aws-auth version