commands.py 文件源码

python
阅读 24 收藏 0 点赞 0 评论 0

项目:kubernetes-starterkit 作者: mdgriffith 项目源码 文件源码
def logs(config):
    pod = subprocess.check_output('kubectl get pods -l "app=api" -o name', shell=True)
    if pod == "":
        print "There is no pod running in this environment.  You may need to deploy first."
        exit(1)
    pod_name = pod.split("/")[1].strip()
    subprocess.call("kubectl logs {pod} --container flask --follow".format(pod=pod_name), shell=True)

# @click.command()
# @click.argument("config", type=StarterkitConfig(r'kube/deployments/'))
# def request_certs():
#     # Request certs
#     subprocess.call("kubectl exec ")
#     # Get status of Certs
#     subprocess.call("kubectl")
#     # If
#     pass
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号