Files
kube-prometheus/docs/KOPSonAWS.md
Frederic Branczyk 89ed6773e7 Add 'contrib/kube-prometheus/' from commit '81c0d2f4d30f63a4e274c2870c5afc89241827b0'
git-subtree-dir: contrib/kube-prometheus
git-subtree-mainline: 050ca21276696c8603375c699513ec487301ed62
git-subtree-split: 81c0d2f4d3
2017-03-06 09:55:36 +01:00

1.7 KiB

Adding kube-prometheus to KOPS on AWS 1.5.x

Prerequisites

A running Kubernetes cluster created with KOPS.

These instructions have currently been tested with topology=public on AWS with KOPS 1.5.1 and Kubernetes 1.5.x

Open AWS Security Groups:

  1. Open port 9100 on the masters security group to the nodes security group
  2. Open ports 10250-10252 on the masters security group to the nodes security group.

Example script below requires $AWS_DEFAULT_PROFILE and $NAME

MASTER_SG=$(aws --profile ${AWS_DEFAULT_PROFILE} ec2 describe-security-groups --filters "Name=tag:Name,Values=masters.$NAME" --query "SecurityGroups[*].GroupId[]" --output=text)
NODES_SG=$(aws --profile ${AWS_DEFAULT_PROFILE} ec2 describe-security-groups --filters "Name=tag:Name,Values=nodes.$NAME" --query "SecurityGroups[*].GroupId[]" --output=text)
aws --profile ${AWS_DEFAULT_PROFILE} ec2 authorize-security-group-ingress --group-id $MASTER_SG --protocol tcp --port 9100 --source-group $NODES_SG
aws --profile ${AWS_DEFAULT_PROFILE} ec2 authorize-security-group-ingress --group-id $MASTER_SG --protocol tcp --port 10250-10252 --source-group $NODES_SG

Adding kube-prometheus

Following the instructions in the README:

Example:

git clone -b master https://github.com/coreos/kube-prometheus.git kube-prometheus-temp;
cd kube-prometheus-temp
./hack/cluster-monitoring/deploy
kubectl -n kube-system create -f manifests/k8s/self-hosted/
cd -
rm -rf kube-prometheus-temp