Skip to content

Commit

Permalink
eks-fargate-otel deploy to fargate in mixed ec2+fargate cluster
Browse files Browse the repository at this point in the history
  • Loading branch information
frank-ang committed Dec 13, 2023
1 parent 231bc97 commit 55226ef
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
5 changes: 4 additions & 1 deletion otel-eks-fargate/cx-eks-fargate-otel-self-monitoring.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -147,4 +147,7 @@ spec:
items:
- key: cx-otel-collector-monitor-config
path: cx-otel-collector-monitor-config.yaml
name: cx-otel-collector-monitor-config-volume
name: cx-otel-collector-monitor-config-volume
nodeSelector:
eks.amazonaws.com/compute-type: fargate
kubernetes.io/os: linux
12 changes: 8 additions & 4 deletions otel-eks-fargate/cx-eks-fargate-otel.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,16 @@ metadata:
data:
label-node-script: |
#!/bin/bash
set +x
# Download kubectl
# If the latest stable version is not compatible with your cluster, adjust accordingly.
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
curl -LOs "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"
# Give execute permissions to kubectl
chmod +x kubectl
# Run the command to label nodes
# Label only the current node as the OTEL-collector-node
./kubectl label nodes --all OTEL-collector-node-
./kubectl label nodes $K8S_NODE_NAME OTEL-collector-node=true
---
# ConfigMap for OTEL collector instance
Expand Down Expand Up @@ -279,4 +280,7 @@ spec:
items:
- key: label-node-script
path: label_node.sh
mode: 0555
mode: 0555
nodeSelector:
eks.amazonaws.com/compute-type: fargate
kubernetes.io/os: linux

0 comments on commit 55226ef

Please sign in to comment.