Welcome to the Linux Foundation Forum!

Exercise 8.1 - kubectl create -f simpleshell.yaml throws error

Hi,

I'm getting error msg -
error: error validating "simpleshell.yaml": error validating data: ValidationError(Pod.spec): unknown field "volumns" in io.k8s.api.core.v1.PodSpec; if you choose to ignore these errors, turn validation off with --validate=false

apiVersion: v1
kind: Pod
metadata:
name: shell-demo
spec:
containers:
- image: nginx
name: nginx
volumeMounts:
- mountPath: /etc/cars
name: car-vol
volumns:
- configMap:
name: fast-car
name: car-vol

not sure why this error is occurring, validation on YAML file shows correct

Answers

  • chrispokorni
    chrispokorni Posts: 2,372

    Hi @sairameshpv,

    Please take a second look at the error message, and more precisely at the following part of the message:

    ... unknown field "volumns" in ...

    Examining closely the field name referenced by the error message you may find that it is misspelled. Please fix the typo of the specified field name.

    Regards,
    -Chris

Categories

Upcoming Training