Skip to content
Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 

Repository files navigation

connect-to-aks

A composite action to connect to a specific aks context and cluster, with kubectl and helm installed. The composite action streamlines the workflow provided within the following guide GitHub Actions for deploying to Kubernetes service.

Usage

Simply call upon the action as so:

- name: Connect to AKS
  id: connect-to-aks
  uses: andersbea/connect-to-aks@v0.0.2
  with: 
    CREDENTIALS: ${{ secrets.AZURE_CREDENTIALS }}
    RESOURCE_GROUP: ${{ vars.AZURE_RESOURCE_GROUP }}
    CLUSTER: ${{ vars.AZURE_CLUSTER }}

Parameters

Name Description
CREDENTIALS The credentials retrieved from Azure (see below)
RESOURCE_GROUP The resource group to which the kubernetes cluster belongs
CLUSTER The name of the kubernetes cluster

Credentials

In order to retrieve the necessary credentials, simply run the following command in a terminal that is logged in to azure cli with an account that has the permissions to manage RBAC:

az ad sp create-for-rbac \
    --name "ghActionAzureVote" \
    --scope /subscriptions/<SUBSCRIPTION_ID>/resourceGroups/<RESOURCE_GROUP> \
    --role Contributor \
    --sdk-auth

The SUBSCRIPTION_ID and RESOURCE_GROUP can be retrieved through the Azure portal.

The entire JSON result represents the CREDENTIALS and should be set as a GitHub secrets value.

About

A composite action to connect to a specific aks context and cluster, with kubectl and helm installed

Resources

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors