Skip to content

Auto DevOps Migrate ingress to networking.k8s.io/v1beta1

Migrate the ingress template from extensions/v1beta1 to networking.k8s.io/v1beta1.

  • What's the migration impact ?

Migrating to the new Ingress API will only require changing the API path - the API fields remain the same

The networking.k8s.io/v1beta1 has been available since 1.14

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

Proposal

  1. Add ability to optionally use networking.k8s.io/v1beta1
  2. When only Kubernetes 1.14+ is supported (https://docs.gitlab.com/ee/user/project/clusters/#supported-cluster-versions), switch default to networking.k8s.io/v1beta1
  3. Eventually, drop support for extensions/v1beta1
Edited by Thong Kuah