This project is one of many projects when i'm in a journey building k8s architecture for migrating to k8s from aws.
Using Horizontal Pod Autoscaler and Autoscaler is kind of pain if worker nodes had not labels. While waiting for this feature from K8S, I wrote this one as a temporary solution. Every worker nodes when join the K8S cluster will have the labels as its tag.
To limit a number of redundant tags added. Checking tag prefix is added. If ec2 tag is devops.apixio.com/hello
it will turn into a label hello
Edit run
in Makefile
to use correct configuration
# start minikube
minikube start
# build binary, because i used MacBook
make macos
# run to test
make run
Worker Node must have at least the following IAM permissions
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "VisualEditor0",
"Effect": "Allow",
"Action": "ec2:Describe*",
"Resource": "*"
}
]
}
kubectl create -f manifest.yml
kubectl create -f manifest-rbac.yml