Complete the code to specify the Ingress API version.
apiVersion: networking.k8s.io/[1]
kind: Ingress
metadata:
name: example-ingressThe current stable API version for Ingress is networking.k8s.io/v1.
Complete the code to define the host for the Ingress rule.
spec:
rules:
- host: [1]
http:
paths:The host field specifies the domain name for routing traffic. example.com is a common placeholder.
Fix the error in the path type specification for Ingress.
paths:
- path: /[1]
pathType: Prefix
backend:
service:
name: service-v1
port:
number: 80The path should be a string representing the URL path prefix, such as v1 for version 1 of the service.
Fill both blanks to route traffic to the correct service and port for version 2.
- path: /[1] pathType: Prefix backend: service: name: [2] port: number: 8080
The path /v2 routes to the service-v2 on port 8080 for A/B testing.
Fill all three blanks to complete the Ingress rule for A/B testing with two services.
apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: ab-testing-ingress spec: rules: - host: [1] http: paths: - path: /[2] pathType: Prefix backend: service: name: [3] port: number: 80
The host is example.com, path /v1 routes to service-v1 on port 80 for the first version.