I am reading on k8s
it has 2 method to use it. Both of them are complement of each other.
Today I tried one feature to get a declarative (manifest file).
Suppose I create namespace
instance
$ kubectl create namespace cert-manager
namespace/cert-manager created
Then I export the manifest file for using declarative method next time
kubectl get namespace cert-manager -o yaml --export > cert-manager.yaml
cert-manager.yaml
apiVersion: v1
kind: Namespace
metadata:
creationTimestamp: null
name: cert-manager
selfLink: /api/v1/namespaces/cert-manager
spec:
finalizers:
- kubernetes
status:
phase: Active
Compare with other example
apiVersion: v1
kind: Namespace
metadata:
name: nginx-ingress
Question
Is 2nd shorter manifest file correctly done?