1 #!/usr/bin/env python 2 # -*- coding: utf-8 -*- 3 #author:wq date:2016-4-28 4 #import os 5 #os.system("systemctl start etcd") 6 #os.system("systemctl start docker") 7 #os.system("systemctl start kube-apiserver") 8 #os.system("systemctl start kube-controller-manager") 9 #os.system("systemctl start kube-scheduler") 10 #os.system("systemctl start kubelet") 11 #os.system("systemctl start kube-proxy") 12 import subprocess 13 subprocess.call('systemctl start etcd',shell=True) 14 subprocess.call('systemctl start docker',shell=True) 15 subprocess.call('systemctl start kube-apiserver',shell=True) 16 subprocess.call('systemctl start kube-controller-manager',shell=True) 17 subprocess.call('systemctl start kube-scheduler',shell=True) 18 subprocess.call('systemctl start kubelet',shell=True) 19 subprocess.call('systemctl start kube-proxy',shell=True)