Answers for "kubectl get yaml for deployment"

2

kubernetes deployment yaml

apiVersion: apps/v1
kind: Deployment
metadata:
  name: nginx-deployment
  labels:
    app: nginx
spec:
  replicas: 3
  selector:
    matchLabels:
      app: nginx
  template:
    metadata:
      labels:
        app: nginx
    spec:
      containers:
      - name: nginx
        image: nginx:1.14.2
        ports:
        - containerPort: 80
Posted by: Guest on November-20-2020
0

kubectl get yaml for deployment

kubectl -n <namespace> get <resource type> <resource Name> -o yaml

##example (will display the yaml on your terminal)###

kubectl -n hrservices get deployment payroll-deployment -o yaml

##example (will save the yaml to a file in current directory)###

kubectl -n hrservices get deployment payroll-deployment -o yaml > payroll.yaml
Posted by: Guest on July-06-2021

Code answers related to "kubectl get yaml for deployment"

Browse Popular Code Answers by Language