Created
March 13, 2020 12:41
-
-
Save abelaska/1ed2c290d97186d1d2c5ed05d187e280 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//resource "null_resource" "apply_kubernetes_update" { | |
// depends_on = [ | |
// module.eks_cluster | |
// ] | |
// | |
// triggers = { | |
// tf_sha1 = sha1(file("${path.module}/kubernetes.tf")) | |
// } | |
// | |
// provisioner "local-exec" { | |
// interpreter = [ | |
// "/bin/bash", | |
// "-c"] | |
// | |
// command = <<EOT | |
// set -e | |
// | |
// echo "Connecting kubectl to AWS EKS cluster ${module.eks_cluster.eks_cluster_id}..." | |
// kubectl config set clusters.${local.cluster_id}.certificate-authority-data ${local.cluster_ca_certificate_base64} --set-raw-bytes=false | |
// kubectl config set-cluster ${local.cluster_id} --server=${local.host} | |
// until kubectl version ${local.kubectl_params} >/dev/null; do sleep 3; done | |
// kubectl version ${local.kubectl_params} | |
// | |
// mkdir -p ${local.metrics_server_path} | |
// curl -sSL https://github.com/kubernetes-sigs/metrics-server/archive/v${local.metrics_server_version}.tar.gz | \ | |
// tar xfz - -C "${local.metrics_server_path}" --strip 1 > /dev/null | |
// | |
// echo 'Applying Metrics server with kubectl...' | |
// kubectl apply ${local.kubectl_params} -f ${local.metrics_server_path}/deploy/1.8+/ | |
// echo 'Applied Metrics server with kubectl' | |
// | |
// echo 'Applying Dashboard with kubectl...' | |
// kubectl apply ${local.kubectl_params} -f https://raw.githubusercontent.com/kubernetes/dashboard/v${local.dashboard_version}/aio/deploy/recommended.yaml | |
// echo 'Applied Dashboard with kubectl' | |
// EOT | |
// } | |
//} | |
// | |
//kubectl delete -f https://raw.githubusercontent.com/kubernetes/dashboard/v2.0.0-rc5/aio/deploy/recommended.yaml | |
//kubectl delete -f deploy/1.8+/ |
Author
abelaska
commented
Mar 31, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment