- Newest
- Most votes
- Most comments
Update kubernetes ingress api version in ingress object before migrating should resolve the issue.
Hi,
--> Please update the ingress api version to networking.k8s.io/v1 --> If you want to use "use-annotation" field as port number then first add below example annotation and then modify spec(pathType is required).
alb.ingress.kubernetes.io/actions.ssl-redirect: '{"Type": "redirect", "RedirectConfig": { "Protocol": "HTTPS", "Port": "443", "StatusCode": "HTTP_301"}}'
spec: rules:
- host: www.example.com
http:
paths:
- path: / pathType: Prefix backend: service: name: ssl-redirect port: name: use-annotation
- backend: service: name: example port: number: <port number {int}> pathType: ImplementationSpecific
--> To verify the values then please execute below command and see the possible values required for ingress object, kubectl explain ingress.spec.rules.http.paths.backend.service --api-version=networking.k8s.io/v1
--> Ingress
and IngressClass
resources have graduated to networking.k8s.io/v1
. Ingress and IngressClass types in the extensions/v1beta1
and networking.k8s.io/v1beta1
API versions are deprecated and will no longer be served in 1.22+. Persisted objects can be accessed via the networking.k8s.io/v1
API. Notable changes in v1 Ingress objects (v1beta1 field names are unchanged):
spec.backend
->spec.defaultBackend
serviceName
->service.name
servicePort
->service.port.name
(for string values)servicePort
->service.port.number
(for numeric values)pathType
no longer has a default value in v1; "Exact", "Prefix", or "ImplementationSpecific" must be specified Other Ingress API updates:- backends can now be resource or service backends
path
is no longer required to be a valid regular expression
Please refer this for more information - https://github.com/kubernetes-sigs/aws-load-balancer-controller/issues/1846
I hope the above information is useful. Thank you.
Relevant content
- Accepted Answer
- asked 3 months ago
- asked a year ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 2 years ago