Monday, April 15, 2024
HomeSoftware EngineeringLearn how to routinely generate a Manifests file in Kubernetes

Learn how to routinely generate a Manifests file in Kubernetes


If you wish to routinely generate a manifest file in Kubernetes, you are able to do so through the use of the kubectl run command coupled with a --dry-run to output on to yaml.

kubectl run nginx --image=nginx --port=80 --replicas=2 --expose --dry-run -o yaml

You too can output this on to a file on disk as follows:

kubectl run nginx --image=nginx --port=80 --replicas=2 --expose --dry-run -o yaml > your-deployment-manifest.yaml
RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments