Path-based-ingress doesnt connect to my deployed service

Hi,
While i was able to route my traffic thru UI. Iam unable to do it thru kubectl.
I tried this :
$ cat path-ing.yml
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: path-based-ingress
spec:
rules:
- host: ‘*.com’
http:
paths:
- path: /hello-node3
backend:
serviceName: hello-node3
servicePort: 8080

but it doesnt add target service

i downloaded the working route from UI and found that they add :
annotations:

So I aded the : field.cattle.io/ingressState: ‘{“base64 of hello-node3/default/*.com//hello-node3/8080”:“deployment:default:hello-node3”}’ to the above yaml and things work.

Can you please advice if this is the right approach ?

Thanks