Skip to content

Krew plugin that helps summarize taints and tolerations across resources

License

Notifications You must be signed in to change notification settings

eytan-avisror/ttsum

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ttsum

ttsum is a plugin that helps summarize taints and tolerations across resources

Use cases

  • Helps cluster admins make modifications to taints & tolerations

  • List nodes with/without a specific taint

  • List resources with/without a specific toleration

Install

$ go install github.com/eytan-avisror/ttsum

Usage from command line

Either download/install a released binary or add as a plugin to kubectl via Krew

$ ttsum
ttsum helps summarize tainted nodes and tolerating resources

Usage:
  ttsum [command]

Available Commands:
  completion  Generate the autocompletion script for the specified shell
  help        Help about any command
  taints      taints summarizes taints for nodes, and whether they will accept a toleration
  tolerations tolerations summarizes tolerations for a resource
  version     Version of ttsum

Flags:
  -h, --help   help for ttsum

Use "ttsum [command] --help" for more information about a command.

Get all tolerations belonging to deployments in a namespace

$ ttsum tolerations apps/v1 deployments -n eytan-avisror
NAMESPACE    	NAME                        	TOLERATIONS
eytan-avisror	nginx      	                  Equal(app=web:NoSchedule)
eytan-avisror	mysql                       	Equal(app=db:NoSchedule)

Get all tolerations belonging to deployments in a namespace with a matcher

$ ttsum tolerations apps/v1 deployments -n eytan-avisror --match "Equal(app=web:NoSchedule)"
NAMESPACE    	NAME                        	TOLERATIONS
eytan-avisror	nginx      	                  Equal(app=web:NoSchedule)

$ ttsum tolerations apps/v1 deployments -n eytan-avisror --no-match "Equal(app=web:NoSchedule)"
NAMESPACE    	NAME                        	TOLERATIONS
eytan-avisror	mysql                       	Equal(app=db:NoSchedule)

List node taints

$ ttsum taints
NAME                         	  TAINTS
ip-10-20-30-58.ec2.internal     app=web:NoSchedule
ip-10-20-30-196.ec2.internal    app=web:NoSchedule
ip-10-20-30-150.ec2.internal    app=web:NoSchedule
ip-10-20-30-247.ec2.internal    app=web:NoSchedule
ip-10-20-30-83.ec2.internal     app=web:NoSchedule
ip-10-20-30-233.ec2.internal    app=db:NoSchedule
ip-10-20-30-200.ec2.internal    app=db:NoSchedule

Similarly you can use a match selector

$ ttsum taints --match "app=web:NoSchedule)"
NAME                         	  TAINTS
ip-10-20-30-58.ec2.internal     app=web:NoSchedule
ip-10-20-30-196.ec2.internal    app=web:NoSchedule
ip-10-20-30-150.ec2.internal    app=web:NoSchedule
ip-10-20-30-247.ec2.internal    app=web:NoSchedule
ip-10-20-30-83.ec2.internal     app=web:NoSchedule

$ ttsum taints --match "app=db:NoSchedule)"
NAME                         	  TAINTS
ip-10-20-30-233.ec2.internal    app=db:NoSchedule
ip-10-20-30-200.ec2.internal    app=db:NoSchedule