Docker – Get YAML for deployed Kubernetes services

dockergoogle-container-registrygoogle-kubernetes-enginekubernetesyaml

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.

The Dockerfile is built into an image on Google Container Registry.

I have deployed the app in Kubernetes via the + button. I don't have the YAML
for this.

I have inserted a Secret in Kubernetes for the PEM file required by the app.

  1. How do I get the YAML for the Deployment, Service and Pod created by
    Kubernetes by filling in the form?
  2. How do I get the Secret into my Pod for usage?

Best Answer

To get the yaml for a deployment (service, pod, secret, etc):

kubectl get deploy deploymentname -o yaml