Get YAML for deployed Kubernetes services?

前端 未结 12 1595
离开以前
离开以前 2020-12-22 23:28

I am trying to deploy my app to Kubernetes running in Google Container Engine.

The app can be found at: https://github.com/Industrial/docker-znc.

12条回答
  •  没有蜡笔的小新
    2020-12-22 23:42

    Syntax for downloading yaml's from kubernetes

    kubectl get [resource type] -n [namespace] [resource Name] -o yaml > [New file name]
    

    Create yaml file from running pod:

    1. kubectl get po -n nginx nginx-deployment-755cfc7dcf-5s7j8 -o yaml > podDetail.yaml

    Create replicaset yaml file from running pod:

    1. kubectl get rs -n nginx -o yaml > latestReplicaSet.yaml

    Create deployement yaml file from running pod:

    1. kubectl get deploy -n nginx -o yaml > latestDeployement.yaml

提交回复
热议问题