Hi
I would like to know the difference between
k create ingress ingress1 --rule="ckaa-mock-exam-solution/video*=my-video-service:8080"
(notice the star after video)
and
k create ingress ingress1 --rule="ckaa-mock-exam-solution/video=my-video-service:8080"
as a note, will there be any difference between
k create ingress ingress1 --rule="ckaa-mock-exam-solution/video*=my-video-service:8080"
--rule=“ckaa-mock-exam-admin/video/admin=my-video-service-admin:8080”`
and
k create ingress ingress1 --rule="ckaa-mock-exam-solution/video=my-video-service:8080"
--rule=“ckaa-mock-exam-admin/video/admin=my-video-service-admin:8080”`
(no star after video)
Hi @stephane.hordoir ,
kubectl --dry-run=client -o yaml create ingress ingress1 --rule="ckaa-mock-exam-solution/video*=my-video-service:8080"
&
kubectl --dry-run=client -o yaml create ingress ingress1 --rule="ckaa-mock-exam-solution/video=my-video-service:8080"
generated the same YAML, so there should be no difference.
I guess you want to check if adding a wildcard to the path making any impact, right?
NGINX ingress controller does support wildcard in the hostName, but not the path. You can find more about ingress path type here: Ingress | Kubernetes
-
ImplementationSpecific
: With this path type, matching is up to the IngressClass. Implementations can treat this as a separate pathType
or treat it identically to Prefix
or Exact
path types.
-
Exact
: Matches the URL path exactly and with case sensitivity.
-
Prefix
: Matches based on a URL path prefix split by /
. Matching is case sensitive and done on a path element by element basis. A path element refers to the list of labels in the path split by the /
separator. A request is a match for path p if every p is an element-wise prefix of p of the request path.
Happy learning,
Trung.
1 Like
Thanks a lot for your reply !
1 Like
You’re welcome, keep learning!