Skip to content

Instantly share code, notes, and snippets.

@mhausenblas
Last active March 13, 2023 18:33
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mhausenblas/01d845449ca71f83170aec81783c8428 to your computer and use it in GitHub Desktop.
Save mhausenblas/01d845449ca71f83170aec81783c8428 to your computer and use it in GitHub Desktop.
AMP for EKS on Fargate

Create cluster:

eksctl create cluster -f cluster-config.yaml

Install Prometheus:

helm install prometheus-for-amp prometheus-community/prometheus \
             -n prometheus \
             -f amp_ingest_override_values.yaml 
nodeExporter:
enabled: false
alertmanager:
enabled: false
serviceAccounts:
server:
create: false
name: "iamproxy"
server:
persistentVolume:
enabled: false
sidecarContainers:
aws-sigv4-proxy-sidecar:
image: public.ecr.aws/aws-observability/aws-sigv4-proxy:1.0
args:
- --name
- aps
- --region
- us-west-2
- --host
- aps-workspaces.us-west-2.amazonaws.com
- --port
- :8005
ports:
- name: aws-sigv4-proxy
containerPort: 8005
remoteWrite:
- url: http://localhost:8005/workspaces/YOUR_AMP_WORKSPACE_ID/api/v1/remote_write
apiVersion: eksctl.io/v1alpha5
kind: ClusterConfig
metadata:
name: amp-eks-fargate
region: us-west-2
version: '1.18'
iam:
withOIDC: true
serviceAccounts:
- metadata:
name: iamproxy
namespace: prometheus
labels: {aws-usage: "application"}
attachPolicy:
Version: "2012-10-17"
Statement:
- Effect: Allow
Action:
- "aps:RemoteWrite"
- "aps:GetSeries"
- "aps:GetLabels"
- "aps:GetMetricMetadata"
- "aps:QueryMetrics"
Resource: '*'
fargateProfiles:
- name: defaultfp
selectors:
- namespace: prometheus
- namespace: kube-system
cloudWatch:
clusterLogging:
enableTypes: ["*"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment