EKS migration from 1.21 to 1.22

0

This is in EKS 1.21 yaml file spec: rules: - http: paths: - path: /* backend: serviceName: ssl-redirect servicePort: use-annotation

How can i migrate into EKS 1.22 yaml file**

Because latest ingress controller port is only int. please help how can i translate into 1.22 EKS

asked a year ago369 views
2 Answers
0

Update kubernetes ingress api version in ingress object before migrating should resolve the issue.

answered a year ago
0

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.

AWS
SUPPORT ENGINEER
answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions