Install Go
brew install golang
Set the golang binary directory
export GOPATH="$HOME/go"
| # Deploy webapp to test the demo namespace | |
| # REF: https://bit.ly/3EKx0cT | |
| --- | |
| apiVersion: v1 | |
| kind: Namespace | |
| metadata: | |
| name: demo | |
| --- | |
| apiVersion: apps/v1 | |
| kind: Deployment |
| ######################################################################################################################## | |
| # EKS Addons | |
| # VER: https://github.com/aws-ia/terraform-aws-eks-blueprints-addons/releases | |
| # TFR: https://github.com/aws-ia/terraform-aws-eks-blueprints-addons#usage | |
| # GHR: https://github.com/aws-ia/terraform-aws-eks-blueprints-addons/blob/99520ae0125df7b24163e14cf4eba2c96fcf14bd/docs/amazon-eks-addons.md#configuration-values | |
| ######################################################################################################################## | |
| module "eks_blueprints_addons" { | |
| source = "aws-ia/eks-blueprints-addons/aws" | |
| version = "~> 1.16.3" |
| ###---------------------------------------------------------------------------- | |
| ### MAIN PROGRAM | |
| ###---------------------------------------------------------------------------- | |
| ### PREP | |
| ###--- | |
| ###--- | |
| ### The kube-prometheus stack includes a resource metrics API server, so the | |
| ### metrics-server addon is unnecessary. |
| /* | |
| AuthN Configuration for EKS | |
| This config solves the issue of pre-configuring cluster credentials before the cluster is built. | |
| */ | |
| ### Discover the Cluster Token for AuthN | |
| data "aws_eks_cluster_auth" "cluster_auth" { | |
| name = module.eks.cluster_name | |
| } |
| apiVersion: apps/v1beta1 | |
| kind: Deployment | |
| metadata: | |
| labels: | |
| name: 12F-app | |
| name: 12F-app | |
| namespace: 12F-app-ns | |
| spec: | |
| replicas: 3 | |
| template: |
| 2023-11-12T19:15:43.027-0800 [INFO] Terraform version: 1.6.3 | |
| 2023-11-12T19:15:43.027-0800 [DEBUG] using github.com/hashicorp/go-tfe v1.36.0 | |
| 2023-11-12T19:15:43.027-0800 [DEBUG] using github.com/hashicorp/hcl/v2 v2.19.1 | |
| 2023-11-12T19:15:43.027-0800 [DEBUG] using github.com/hashicorp/terraform-svchost v0.1.1 | |
| 2023-11-12T19:15:43.027-0800 [DEBUG] using github.com/zclconf/go-cty v1.14.1 | |
| 2023-11-12T19:15:43.027-0800 [INFO] Go runtime version: go1.21.3 | |
| 2023-11-12T19:15:43.027-0800 [INFO] CLI args: []string{"/opt/homebrew/Cellar/tfenv/3.0.0/versions/1.6.3/terraform", "fmt", "-recursive=true"} | |
| 2023-11-12T19:15:43.027-0800 [DEBUG] Attempting to open CLI config file: /Users/thomas/.terraformrc | |
| 2023-11-12T19:15:43.027-0800 [DEBUG] File doesn't exist, but doesn't need to. Ignoring. | |
| 2023-11-12T19:15:43.028-0800 [DEBUG] checking for credentials in "/Users/thomas/.terraform.d/plugins" |
| # This is an initContainer: | |
| # REF: https://kubernetes.io/docs/concepts/workloads/pods/init-containers/ | |
| # It is configured in a pod like any other container, except that it is | |
| # specified inside its own "initContainers" section. | |
| apiVersion: v1 | |
| kind: Pod | |
| metadata: | |
| name: myapp-pod | |
| labels: | |
| app: myapp |