为部署的Kubernetes服务获取YAML? [英] Get YAML for deployed Kubernetes services?

查看:1010
本文介绍了为部署的Kubernetes服务获取YAML?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将我的应用程序部署到在 Google容器中运行的 Kubernetes 引擎.

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

可以在以下位置找到该应用程序: https://github.com/Industrial/docker-znc.

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

Dockerfile 内置在 Google Container Registry 上的映像中.

我已通过+按钮将应用程序部署在 Kubernetes 中.我没有YAML 为此.

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

我已在 Kubernetes 中为应用程序所需的PEM文件插入了 Secret .

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

  1. 如何获取由以下人员创建的 Deployment Service Pod 的YAML 通过填写表格来使用Kubernetes吗?
  2. 如何将 Secret 放入我的 Pod 中以供使用?
  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?

推荐答案

要获取部署的Yaml(服务,吊舱,机密等):

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

kubectl get deploy deploymentname -o yaml --export

这篇关于为部署的Kubernetes服务获取YAML?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆