Skip to content

zduymz/tag-to-label

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tag-to-label

This project is one of many projects when i'm in a journey building k8s architecture for migrating to k8s from aws.

Purpose

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

Testing on local

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

Run on Kubernetes

Worker Node must have at least the following IAM permissions

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "VisualEditor0",
            "Effect": "Allow",
            "Action": "ec2:Describe*",
            "Resource": "*"
        }
    ]
}

Without RBAC

kubectl create -f manifest.yml

With RBAC

kubectl create -f manifest-rbac.yml

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published