Migrating from ingress networking.k8s.io/v1beta1 to /v1
The extensions/v1beta1 and networking.k8s.io/v1beta1 API versions of Ingress will no longer be served in v1.22. Migrate manifests and API clients to use the networking.k8s.io/v1 API version, available since v1. 19.
Simple, short and sweet
As networking.k8s.io/v1beta1 is getting deprecated with Kubernetes version 1.22+, So here we present you a short and simple guide for migrating from networking.k8s.io/v1beta1
to networking.k8s.io/v1
.
Here is a simple example of ingress with networking.k8s.io/v1beta1
apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
name: example
annotations:
kubernetes.io/ingress.class: nginx
spec:
rules:
- host: example.com
http:
paths:
- path: /
backend:
serviceName: example
servicePort: 80
Some of the main changes in /V1 includes
* `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
So according to above changes our ingress file becomes
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: example
annotations:
kubernetes.io/ingress.class: nginx
spec:
rules:
- host: example.com
http:
paths:
- backend:
service:
name: example
port:
number: 80
path: /
pathType: Exact
For more example and references visit Kubernetes.io ingress
So, these are the tips to create killer content for your website. Also, check Managed Kubernetes Service Vs Self-Managed what to choose?
Check Out Sportsfeed for Sports News, Reviews & More. Shaurya Loans Cityhawk Fauji Farms City Hawks Sports
April 6, 2021, 11:40 am