Complete the code to specify the path for routing in the Ingress rule.
paths: - path: [1] pathType: Prefix backend: service: name: my-service port: number: 80
The path must start with a slash '/' to define the route correctly in Kubernetes Ingress.
Complete the code to set the pathType for prefix-based routing.
paths:
- path: /app
pathType: [1]
backend:
service:
name: app-service
port:
number: 8080For path-based routing that matches all paths starting with the given prefix, use Prefix as the pathType.
Fix the error in the Ingress rule by completing the backend service port number.
rules:
- http:
paths:
- path: /web
pathType: Prefix
backend:
service:
name: web-service
port:
number: [1]The port number must be an integer, such as 80, not a string or protocol name.
Fill both blanks to complete the Ingress rule for routing /blog and /shop paths to their services.
rules:
- http:
paths:
- path: [1]
pathType: Prefix
backend:
service:
name: blog-service
port:
number: 80
- path: [2]
pathType: Prefix
backend:
service:
name: shop-service
port:
number: 8080Paths must start with a slash and match the intended route names exactly.
Fill all three blanks to create a dictionary of paths with their backend service names and ports.
paths_dict = {
[1]: {
"service": [2],
"port": [3]
}
}The dictionary key is the path string, the service is the service name string, and the port is the integer port number.