Can someone tell me whats the problem here is? kubectl create ingress catch-all . . .

Samir:
Can someone tell me whats the problem here is?

kubectl create ingress catch-all --class=otheringress --rule="/pay=webapp-pay:8080"

Samir:
Question: You are requested to make the new application available at /pay.
Identify and implement the best approach to making this application available on the ingress controller and test to make sure its working. Look into annotations: rewrite-target as well.

• Ingress Created
• Path: /pay
• Configure correct backend service
• Configure correct backend port

Madhan Kumar:
for ingress i would just follow the yaml route … vopy past the yaml from docs …

Samir:
so official documentation is wrong ?
https://kubernetes.io/docs/reference/generated/kubectl/kubectl-commands#-em-ingress-em-

unnivkn:
try this: k get svc & use the svc port in ingress

kubectl create ing my-ingress --rule="/pay=webapp-pay:8080"

Hinodeya:
@Samir go to vi and copy the line /stream for exemple after that you just need to put concerned modification

Hinodeya:
kubectl get ingress “name of ingress” -o yaml > ing.yaml

Hinodeya:
in the memory you have video and eat or something like that :wink:

Samir:
Thanks for your answers guys. I know how to resolve it but I am confused why a command from the official documentation does not work …

Samir:
I am trying to resolve every task fast with declaritive cmds. I want to avoid any creation of yaml files

Hinodeya:
oupss sorry

Hinodeya:
unfortunatly it’s not possible for deamonset :wink: you need to use deploy imperative command

Hinodeya:
and change the yaml

Samir:
daemonset? I was asking about ingress :sweat_smile:

Mayur Sharma:
@Samir Ingress is a complex object, so I generally use the yaml. have bookmarked it for ready-to-use recipe.

One host two path: https://kubernetes.io/docs/concepts/services-networking/ingress/#simple-fanout
Multiple hostnames in single path:
https://kubernetes.io/docs/concepts/services-networking/ingress/#simple-fanout

Samir:
thank you for this bookmarks!

Nitin:
Hey @Mayur Sharma thanks for sharing the BMs but both looks same?

Mayur Sharma:
@Nitin First bookmark is for the scenario when you have one host path and want two path to redirect: https://kubernetes.io/docs/concepts/services-networking/ingress/#simple-fanout
And, below BM is for different subdomain (multiple hostnames):
https://kubernetes.io/docs/concepts/services-networking/ingress/#simple-fanout