Skip to content

Instantly share code, notes, and snippets.

@away168
Last active October 11, 2022 15:45
Show Gist options
  • Save away168/5b10aff986bbe6a7dfd39cd589b73033 to your computer and use it in GitHub Desktop.
Save away168/5b10aff986bbe6a7dfd39cd589b73033 to your computer and use it in GitHub Desktop.
cp k8s manifest
version: 1
deploy:
steps:
setupVariables:
after:
- echo "hello world"
terraformInit:
before:
- |
if [[ -z $ENV0_ROOT_DIR/kubeconfig_eks-test-cluster ]]; then
cp $ENV0_ROOT_DIR/kubeconfig_eks-test-cluster $ENV0_TEMPLATE_DIR/.
fi
onCompletion:
- cp ./kubeconfig_eks-test-cluster $ENV0_ROOT_DIR/.
provider "kubernetes" {
host = var.cluster_endpoint
cluster_ca_certificate = base64decode(var.cluster_ca_cert)
exec {
api_version = "client.authentication.k8s.io/v1alpha1"
args = ["token", "-i", "eks-test-cluster"]
command = "aws-iam-authenicator"
}
}
provider "helm" {
kubernetes {
host = var.cluster_endpoint
cluster_ca_certificate = base64decode(var.cluster_ca_cert)
exec {
api_version = "client.authentication.k8s.io/v1alpha1"
args = ["token", "-i", "eks-test-cluster"]
command = "aws-iam-authenicator"
}
}
}
provider "kubernetes" {
}
provider "helm" {
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment