When attempting to apply or create a Valkey custom resource instance using kubectl apply -f, the deployment fails with the following strict decoding error:
Error from server (BadRequest): error when creating "valkey-instance.yaml": Valkey in version "v1" cannot be handled as a Valkey: strict decoding error: unknown field "spec.kubernetesConfig.service"
Tanzu for Valkey on Kubernetes
The custom resource definition (CRD) schema for [data.tanzu.vmware.com/v1](https://data.tanzu.vmware.com/v1) expects the Kubernetes service type to be declared via the field spec.kubernetesConfig.serviceType.
Using the nested block structure spec.kubernetesConfig.service.type causes a strict YAML decoding failure because the field service is not recognized by the Tanzu for Valkey Operator schema.
Update the Valkey manifest YAML to define serviceType directly under spec.kubernetesConfig.
apiVersion: data.tanzu.vmware.com/v1
kind: Valkey
metadata:
name: valkey-sample
namespace: <your-namespace>
spec:
valkeyVersion:
name: valkey-9.1.0
kubernetesConfig:
serviceType: LoadBalancer # Correct property syntax