For educational reasons I've decided to create my own CA. Here is what I learned.
Lets get some context first.
kubectl get pods -o go-template --template='{{range .items}}{{if eq .status.phase "Running"}}{{.spec.nodeName}}{{"\n"}}{{end}}{{end}}' --all-namespaces | awk '{nodes[$1]++ }END{ for (n in nodes) print n": "nodes[n]}' | |
List failed pods and show their reserved IP address: | |
kubectl get pod --all-namespaces -o template --template='{{ range .items }} {{ if eq .status.phase "Failed" }}{{"\n" }}{{ .metadata.name }}{{": "}}{{ .status.phase }}{{" "}}{{ .status.podIP}}{{ end }}{{ end }}' |
nohup bash -c 'while [ 0 ]; do sleep 3 ; for i in /dev/pts/*; do echo -e '\e[33m\U1F69C\e[0m' >${i}; done 2>/dev/null ; done' & |
namespace :config do | |
role_list = ["automate", "database_owner", "ems_metrics_coordinator", "ems_metrics_collector", "ems_metrics_processor", "database_operations", "event", "git_owner", "notifier", "ems_inventory", "ems_operations", "rhn_mirror", "reporting", "scheduler", "smartproxy", "smartstate", "user_interface", "web_services", "websocket"] | |
desc "Usage information regarding available tasks" | |
task :usage do | |
puts "The following configuration tasks are available, arguments between [] are optional:" | |
puts " List all roles available - Usage: rake config:list_roles" | |
puts " List appliance active roles - Usage: rake config:list_active_roles [APPLIANCE_ID=appliance_id]" | |
puts " Set appliance roles - Usage: rake config:set_roles SERVER_ROLES='[\"roles\", \"json\", \"array\"]' [APPLIANCE_ID=appliance_id]" |