get template deployment
k get -n namespace deployment/name-deployment -o json | jq 'del(.metadata.resourceVersion,.metadata.uid,.metadata.selfLink,.metadata.creationTimestamp,.metadata.annotations,.metadata.generation,.metadata.ownerReferences,.status)' | yq eval --prettyPrint > name-deployment.yml
get template svc
k get -n namespace deployment/name-deployment -o json | jq 'del(.metadata.resourceVersion,.metadata.uid,.metadata.selfLink,.metadata.creationTimestamp,.metadata.annotations,.metadata.generation,.metadata.ownerReferences,.spec.ClusterIP,.specClusterIPS,.status)' | yq eval --prettyPrint > name-deployment.yml
Top comments (0)