k8s ingress yaml 字段解释
时间: 2023-10-11 17:13:50 浏览: 75
Kubernetes(In short k8s) Ingress is an API object that provides a collection of routing rules that govern how external users access services running in a Kubernetes cluster. In simple terms, Ingress exposes HTTP and HTTPS routes from outside the cluster to services within the cluster.
For creating an Ingress object, a YAML file is used with different fields defined in it. The YAML fields and their explanations are as follows:
1. apiVersion: This field defines the version of the APIs that the YAML is written for.
2. kind: This field defines the type of object being created. In this case, it will be Ingress.
3. metadata: This field consists of data like the name, namespace, labels, and annotations describing the Ingress object.
4. spec: The spec field defines the rules for the Ingress object. The spec consists of different fields like rule, path, backend, and etc which defines routing rules, paths, and backend services of the Ingress object.
I hope this clarifies your doubts regarding the k8s ingress yaml field explanation.
阅读全文