Skip to content

Latest commit

 

History

History

kubectl

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

GitHub Actions for Amazon EKS Authentication with kubectl

This Action for Amazon Elastic Container Service for Kubernetes (Amazon EKS) that saves a kubectl config with AWS credentials and warps the kubectl command.

Usage

A partial example workflow applying a configuration and verifying the deployment status.

workflow "Build and Deploy" {
  on = "push"
  resolves = ["Verify EKS Deployment"]
}
action "Deploy to EKS" {
  needs = ["Build and Push Containers"]
  uses = "actions/aws/kubectl@master"
  args = ["kubectl apply -f config.yml"]
  secrets = ["KUBE_CONFIG_DATA"]
}

action "Verify EKS Deployment" {
  needs = "Deploy to EKS"
  uses = "actions/aws/kubectl@master"
  args = ["rollout status deployment/aws-example-octodex"]
  secrets = ["KUBE_CONFIG_DATA"]
}

Secrets

  • KUBE_CONFIG_DATARequired A base64-encoded kubectl config file with credentials for Kubernetes to access the cluster. Example encoding from terminal : cat $HOME/.kube/config | base64. Note Do not use kubectl config view as this will hide the certificate-authority-data.

License

The Dockerfile and associated scripts and documentation in this project are released under the MIT License.

Container images built with this project include third party materials. See THIRD_PARTY_NOTICE.md for details.