Ingress in version "v1" cannot be handled as a Ingress

Hi you all,
studying Ingress on my laptop with minikube, I’m testing this manifest from Kubernetes up&running p.94

##################################

apiVersion: networking.k8s.io/v1 # the original has “extensions/v1beta1”
# but is deprecated
kind: Ingress
metadata:
name: host-ingress
spec:
rules:

##################################

I’m getting the following error and the web isn’t being so useful.

rob@k8s-master1:~$ kubectl apply -f ./test_ingress.yml
Error from server (BadRequest): error when creating “./test_ingress.yml”: Ingress in version “v1” cannot be handled as a Ingress: strict decoding error: unknown field “spec.rules[0].http.paths[0].backend.serviceName”, unknown field “spec.rules[0].http.paths[0].backend.servicePort”
rob@k8s-master1:~$

Does anybody have any idea?
thanks in advance

Cluster information:

Kubernetes version: minikube version: v1.28.0
Cloud being used: bare-metal
Installation method:
Host OS: debian 11 ( virtualized on virtualbox )

That’s not the API. Try spec.rules[0].http.paths[0].backend.service.port

Thanks @thockin for your reply.
I just got this:

rob@k8s-master1:~$ kubectl apply -f simple-ingress.yml
Error from server (BadRequest): error when creating “simple-ingress.yml”: Ingress in version “v1” cannot be handled as a Ingress: json: cannot unmarshal number into Go struct field IngressServiceBackend.spec.rules.http.paths.backend.service.port of type v1.ServiceBackendPort
rob@k8s-master1:~$

This is still a struct - you can set the .number field if you have a numeric port or the .name field if you have a name.

See the examples at Ingress | Kubernetes