Fortinet white logo
Fortinet white logo

Kubernetes API Version Reference

Kubernetes API Version Reference

The Kubernetes API allows you to query and manipulate the state of API objects in Kubernetes (for example: Pods, Nodes, Ingress, and Services).

For the API object, such as the Ingress object you defined in the YAML file, there will be an apiVersion field for Kubernetes to determine which API version to deploy the object. Different API versions may have different metadata and specific definitions for that object.

For example, for the Ingress API object, the API versions extensions/v1beta1/Ingress and networking.k8s.io/v1/Ingress would have different data structures for FortiADC Kubernetes Controller to parse. Before extensions/v1beta1/Ingress is entirely deprecated by networking.k8s.io/v1/Ingress in Kubernetes v1.22, you may find both API versions are supported by the Kubernetes API server in some cases, such as when upgrading Kubernetes from a lower version v1.16 to a higher version v1.19.

To ensure you use an API version of Kubernetes objects that FortiADC Kubernetes Controller supports, you can use the kubectl command to check the resource API version.

user@control-plane-node:~$ for kind in `kubectl api-resources | tail +2 | awk '{ print $1 }'`; do kubectl explain $kind; done | grep -e "KIND:" -e "VERSION:"

The table below lists the API version of the required API object used for FortiADC Kubernetes Controller:

API Object

API Version

Node v1
Pod v1
PodTemplate v1
ServiceAccount v1
Service v1
Deployment apps/v1

ReplicaSet

apps/v1

DaemonSets

apps/v1

Endpoint

v1

EndpointSlice

discovery.k8s.io/v1

Event

v1

IngressClass

networking.k8s.io/v1

Ingress

networking.k8s.io/v1

ClusterRoleBinding

rbac.authorization.k8s.io/v1

ClusterRole

rbac.authorization.k8s.io/v1

RoleBinding

rbac.authorization.k8s.io/v1

Role

rbac.authorization.k8s.io/v1

*Starting with version 3.0.0, the FortiADC Kubernetes Controller uses the EndpointSlice resource (discovery.k8s.io/v1) instead of the legacy Endpoint (v1) API, aligning with Kubernetes' updated service discovery framework.

Kubernetes API Version Reference

Kubernetes API Version Reference

The Kubernetes API allows you to query and manipulate the state of API objects in Kubernetes (for example: Pods, Nodes, Ingress, and Services).

For the API object, such as the Ingress object you defined in the YAML file, there will be an apiVersion field for Kubernetes to determine which API version to deploy the object. Different API versions may have different metadata and specific definitions for that object.

For example, for the Ingress API object, the API versions extensions/v1beta1/Ingress and networking.k8s.io/v1/Ingress would have different data structures for FortiADC Kubernetes Controller to parse. Before extensions/v1beta1/Ingress is entirely deprecated by networking.k8s.io/v1/Ingress in Kubernetes v1.22, you may find both API versions are supported by the Kubernetes API server in some cases, such as when upgrading Kubernetes from a lower version v1.16 to a higher version v1.19.

To ensure you use an API version of Kubernetes objects that FortiADC Kubernetes Controller supports, you can use the kubectl command to check the resource API version.

user@control-plane-node:~$ for kind in `kubectl api-resources | tail +2 | awk '{ print $1 }'`; do kubectl explain $kind; done | grep -e "KIND:" -e "VERSION:"

The table below lists the API version of the required API object used for FortiADC Kubernetes Controller:

API Object

API Version

Node v1
Pod v1
PodTemplate v1
ServiceAccount v1
Service v1
Deployment apps/v1

ReplicaSet

apps/v1

DaemonSets

apps/v1

Endpoint

v1

EndpointSlice

discovery.k8s.io/v1

Event

v1

IngressClass

networking.k8s.io/v1

Ingress

networking.k8s.io/v1

ClusterRoleBinding

rbac.authorization.k8s.io/v1

ClusterRole

rbac.authorization.k8s.io/v1

RoleBinding

rbac.authorization.k8s.io/v1

Role

rbac.authorization.k8s.io/v1

*Starting with version 3.0.0, the FortiADC Kubernetes Controller uses the EndpointSlice resource (discovery.k8s.io/v1) instead of the legacy Endpoint (v1) API, aligning with Kubernetes' updated service discovery framework.