I'm getting the following error when I attempt to create the postgres-deployment.yaml
error: error validating "postgres-deployment.yml": error validating data: ValidationError(Deployment.spec): missing required field "selector" in io.k8s.api.apps.v1.DeploymentSpec; if you choose to ignore these errors, turn validation off with --validate=false
I can ignore it for now but it seems like something that should be demonstrated to the current spec. Or am I (very likely) missing something?
UPDATE
I actually can't seem to ignore it. Now I feel confident I am doing something wrong.
The Deployment "postgres" is invalid:
* spec.selector: Required value
* spec.template.metadata.labels: Invalid value: map[string]string{"app":"postgres"}: `selector` does not match template `labels`
UPDATE 2
By rolling back the api version it works. But I'm still not sure that is the correct solution?
apiVersion: apps/v1beta1
I'm getting the following error when I attempt to create the postgres-deployment.yaml
I can ignore it for now but it seems like something that should be demonstrated to the current spec. Or am I (very likely) missing something?
UPDATE
I actually can't seem to ignore it. Now I feel confident I am doing something wrong.
UPDATE 2
By rolling back the api version it works. But I'm still not sure that is the correct solution?
apiVersion: apps/v1beta1