Deploy EKS Observability resources.
- Access to an AWS account.
- An operational EKS cluster created in your account and appropriate access.
- EKS security groups should allow HTTPS ingress from your Cloud9 instance.
- IAM Identity Center is configured in the account with a user and group.
- A running Cloud9 environment with Administrator access for the instance IAM role.
- Ensure that kubectl is available from the Cloud9 environment with
kubectl version --client
- Ensure terraform is available from the Cloud9 environment with
terraform version
- Go to AWS Cloud9 and connect to your environment
- Disable AWS managed temporary credentials in Cloud9. They do not play nice with EKS.
- In the Cloud9 IDE, click on the cog icon at the top right of the IDE
- Scroll down to
AWS Settings
- Turn off
AWS managed temporary credentials
- If kubectl is not install, install it with the appropriate method for your OS here
- Connect to your EKS cluster and confirm access
aws eks update-kubeconfig --name <your-cluster-arn> --alias <optional-kube-context-alias> kubectl get all -A
- If Terraform is not installed, install it with the appropriate method for your OS here
- Populate your
terraform.tfvars
file with your EKS cluster name and region - Deploy your Terraform template
terraform init terraform apply
- Verify
Baseline dashboards and alerts are deployed from the Observability Accelerator artifacts repository. These artifacts are based on the Kubernetes Mixin repo for Kubernetes monitoring.
Let's deploy a modified version of a sample application provided by AWS. Original source can be found here
-
From within this demo repo, change to the
sample-app
directory.cd sample-app
-
Retrieve the load balancer DNS name from the Ingress resource in your new namespace
sed -i "s/{{external_ip}}/$(kubectl -n ingress-nginx get svc ingress-nginx-controller -o 'jsonpath={$.status.loadBalancer.ingress[0].hostname}')/g" nginx-traffic-sample.yaml
-
Deploy the sample application manifest
kubectl apply -f nginx-traffic-sample.yaml
-
Verify template deployed resources
kubectl get ingress,pod,svc -n sample-app
You should see similar output to the following
NAME READY STATUS RESTARTS AGE pod/apple-app 1/1 Running 0 2m53s pod/banana-app 1/1 Running 0 2m53s pod/traffic-generator 1/1 Running 0 2m53s NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE service/apple-service ClusterIP 172.20.37.121 <none> 5678/TCP 2m53s service/banana-service ClusterIP 172.20.42.197 <none> 5678/TCP 2m53s NAME CLASS HOSTS ADDRESS PORTS AGE ingress.networking.k8s.io/ingress-nginx-demo nginx nginx-eksblueprintblue-82fc84117349e7fb.elb.us-west-2.amazonaws.com nginx-eksblueprintblue-82fc84117349e7fb.elb.us-west-2.amazonaws.com 80 2m53s
Name | Version |
---|---|
terraform | ~> 1.7 |
aws | ~> 5.49 |
helm | ~> 2.13 |
kubectl | ~> 2.0 |
kubernetes | ~> 2.30 |
Name | Version |
---|---|
aws | ~> 5.49 |
Name | Source | Version |
---|---|---|
addons | aws-ia/eks-blueprints-addons/aws | ~>1.16 |
eks_monitoring | github.com/aws-observability/terraform-aws-observability-accelerator//modules/eks-monitoring | v2.12.2 |
managed_grafana | terraform-aws-modules/managed-service-grafana/aws | ~>2.1 |
Name | Type |
---|---|
aws_sns_topic.prometheus_alerts_topic | resource |
aws_sns_topic_subscription.grafana_alert_sub | resource |
aws_caller_identity.current | data source |
aws_eks_cluster.this | data source |
aws_eks_cluster_auth.this | data source |
Name | Description | Type | Default | Required |
---|---|---|---|---|
cluster_name | EKS cluster name the workspace is deployed for | string |
n/a | yes |
grafana_workspace_name | Grafana workspace name | string |
n/a | yes |
region | AWS Region being deployed to | string |
n/a | yes |
adot_loglevel | Verbosity level for ADOT Collector | string |
"normal" |
no |
alert_email_addresses | Email addressses for Observability alerts | list(string) |
[] |
no |
enable_dashboards | Enables or disables curated dashboards. Dashboards are managed by the Grafana Operator | bool |
true |
no |
global_tags | Map of key,value pairs to tag all resources | map(string) |
{ |
no |
grafana_admin_groups | List of AWS SSO groups to assign as administrators in Amazon Managed Grafana | list(string) |
[] |
no |
grafana_editor_groups | List of AWS SSO groups to assign as editor in Amazon Managed Grafana | list(string) |
[] |
no |
grafana_enable_alerts | Determines whether IAM permissions for alerting are enabled for the workspace IAM role | bool |
true |
no |
grafana_readonly_groups | List of AWS SSO groups to assign as readonly users in Amazon Managed Grafana | list(string) |
[] |
no |
grafana_version | Grafana version | string |
"9.4" |
no |
target_secret_name | Target secret in Kubernetes to store the Grafana API Key Secret | string |
"grafana-admin-credentials" |
no |
target_secret_namespace | Target namespace of secret in Kubernetes to store the Grafana API Key Secret | string |
"grafana-operator" |
no |
No outputs.