Doubt in Lab : Deployment in last question

apiVersion: apps/v1
kind: Deployment
metadata:
name: httpd-frontend

spec:
replicas: 3
selector:
matchLables:
name: httpd-frontend
template:
metadata:
lables:
name: httpd-frontend
spec:
containers:
- name: httpd-frontend
image: httpd:2.4-alpine

Getting this error:

error: error validating “deployment2.yaml”: error validating data: [ValidationError(Deployment.spec.selector): unknown field “matchLables” in io.k8s.apimachinery.pkg.apis.meta.v1.LabelSelector, ValidationError(Deployment.spec.template.metadata): unknown field “lables” in io.k8s.apimachinery.pkg.apis.meta.v1.ObjectMeta]; if you choose to ignore these errors, turn validation off with --validate=false
root@controlplane:~#

ive done the proper indentation.

@ajey, You need to use correct spelling. It should be matchLabels instead of matchLables.

1 Like