3 from fabric.api import run
6 def label_node(labels, hostname):
9 for key, value in labels.items():
10 label_pair_string = '%s=%s' % (key, value)
11 label_list.append(label_pair_string)
12 label_string = ' '.join(label_list)
13 command = 'kubectl label nodes %s %s' % (hostname, label_string)
17 def stop_node(hostname):
18 command = 'kubectl drain %s' % (hostname)
22 def delete_node(hostname):
23 command = 'kubectl delete no %s' % (hostname)