Understanding Ingress Control Class Name in Kubernetes
In the intricate and ever-evolving landscape of Kubernetes, managing external access to services within a cluster is a cornerstone of any robust deployment. While Kubernetes provides powerful primitives for internal service communication, exposing these services to the wider internet or to external clients requires a specialized mechanism. This is where Ingress comes into play, serving as a critical component for routing external HTTP and HTTPS traffic to appropriate internal services. Yet, as clusters grow in complexity and the need for specialized traffic management intensifies, the simple Ingress resource alone often proves insufficient. The introduction of ingressClassName represents a significant evolution in how we define, manage, and scale external access in Kubernetes, offering a declarative and standardized way to specify which Ingress controller should handle a particular Ingress resource.
This article embarks on a comprehensive journey into the world of ingressClassName. We will meticulously unpack its purpose, trace its historical development from the era of annotations, explore the underlying IngressClass resource, and illuminate its profound practical applications in diverse Kubernetes environments. From running multiple Ingress controllers concurrently to implementing nuanced traffic policies and even touching upon its relationship with the broader concept of an API gateway, we will cover the spectrum of possibilities. Furthermore, we will delve into best practices for its deployment and management, discuss its security implications, and ultimately look towards the future of Kubernetes networking with the Gateway API, understanding where ingressClassName fits in this exciting trajectory. By the end of this exploration, you will possess a profound understanding of ingressClassName and be equipped to leverage its full potential for building scalable, resilient, and efficiently managed Kubernetes applications.
1. The Foundations of Kubernetes Ingress: Laying the Groundwork
Before we delve into the intricacies of ingressClassName, it is essential to establish a firm understanding of the fundamental concepts surrounding Kubernetes Ingress. This foundational knowledge will serve as our compass as we navigate the more advanced aspects of traffic management.
1.1 What is Kubernetes Ingress?
At its core, Kubernetes Ingress is an API object that acts as an entry point for external access to services within a Kubernetes cluster, specifically handling HTTP and HTTPS traffic. It provides a way to consolidate routing rules, manage host-based and path-based routing, terminate SSL/TLS, and perform basic load balancing. Without Ingress, exposing services typically involves using NodePort or LoadBalancer service types. While these methods are effective for simple scenarios, they can quickly become cumbersome and costly in more complex deployments.
Consider a scenario where you have multiple microservices, each needing to be accessible from the internet. If you were to use NodePort for each, you'd end up with a plethora of open ports on your cluster nodes, potentially conflicting and difficult to manage. LoadBalancer services, while more elegant, typically provision a dedicated cloud load balancer for each service, which can incur significant costs and configuration overhead. Ingress addresses these challenges by providing a single point of entry, often backed by a single external load balancer, that can intelligently route traffic to many different services based on rules defined within the Ingress resource itself.
An Ingress resource primarily defines a collection of rules for routing external HTTP(S) requests to backend services. These rules specify:
- Host: Which domain name should trigger this rule (e.g.,
api.example.com). - Path: Which URL path within that domain (e.g.,
/users,/products) should be matched. - Backend Service: Which Kubernetes Service and port the traffic should be forwarded to.
- TLS Configuration: How SSL/TLS termination should be handled, typically referencing a Kubernetes Secret containing the certificate and private key.
The power of Ingress lies in its ability to abstract away the underlying networking complexities, offering a declarative interface for developers and operators to define how their applications are exposed. This separation of concerns allows application developers to focus on their services, while network administrators can manage external access policies through standard Kubernetes objects.
1.2 The Role of an Ingress Controller
While the Ingress resource defines what the routing rules are, it is merely a declarative specification. It doesn't actually perform the routing itself. This crucial task falls to the Ingress Controller. An Ingress Controller is a specialized component, typically a Pod running within the Kubernetes cluster, that is responsible for fulfilling the Ingress API. It continuously watches the Kubernetes API server for new, updated, or deleted Ingress resources. When it detects changes, it translates these high-level Ingress rules into concrete configurations for an underlying traffic-forwarding mechanism.
Think of the Ingress resource as a blueprint for a house, and the Ingress Controller as the construction crew that takes that blueprint and builds the house. Without the construction crew, the blueprint is just a piece of paper.
There are numerous Ingress Controllers available, each with its own strengths, features, and underlying technology. Some of the most popular and widely used examples include:
- Nginx Ingress Controller: One of the most common controllers, it uses Nginx as the reverse proxy. It's highly configurable and robust, supporting a wide range of features.
- Traefik Proxy: A modern HTTP reverse proxy and load balancer that makes deployment of microservices easy. It's known for its dynamic configuration capabilities.
- Envoy-based Controllers: Controllers like Contour (powered by Envoy Proxy) offer advanced traffic management features, often used in service mesh contexts.
- Cloud-Specific Ingress Controllers: Cloud providers like Google Cloud (GKE Ingress Controller for Google Cloud Load Balancer), AWS (AWS ALB Ingress Controller), and Azure (Azure Application Gateway Ingress Controller) provide their own controllers that integrate directly with their native load balancing solutions.
- Service Meshes with Ingress Capabilities: Service meshes like Istio can also act as Ingress controllers, providing comprehensive traffic management, security, and observability from the edge to the service mesh.
When an Ingress Controller starts, it typically connects to the Kubernetes API server. It then initiates a watch on Ingress resources, Service resources, Endpoint resources, Secret resources (for TLS certificates), and potentially other custom resources. When an Ingress resource is created or modified, the controller parses its rules. Based on these rules, it generates the appropriate configuration for its underlying proxy or load balancer. For instance, an Nginx Ingress Controller would generate Nginx configuration files (e.g., nginx.conf) and reload Nginx to apply the changes. A cloud-specific controller might make API calls to its cloud provider to provision or update a load balancer.
This dynamic configuration is a powerful feature of Kubernetes Ingress. It allows operators to define network routing declaratively, and the controller ensures that the actual network infrastructure reflects that desired state, automating what would otherwise be a complex manual configuration process. This makes the Ingress Controller a critical gateway for all incoming external HTTP/HTTPS traffic, acting as the first point of contact before requests reach the internal services. Understanding this fundamental relationship between the Ingress resource and the Ingress Controller is crucial for appreciating the significance of ingressClassName.
2. The Evolution of Ingress Configuration in Kubernetes
The journey of Kubernetes Ingress configuration has been one of continuous refinement, driven by the need for greater clarity, standardization, and flexibility. From its early reliance on annotations to the introduction of a dedicated API field, this evolution reflects the growing maturity of Kubernetes and its ecosystem.
2.1 Early Days: Annotations and Their Limitations
In the nascent stages of Kubernetes Ingress, the primary mechanism for an Ingress resource to declare which Ingress controller should process it was through annotations. Specifically, the annotation kubernetes.io/ingress.class was widely adopted for this purpose. An Ingress resource would include this annotation, with its value indicating the intended controller. For example, an Ingress meant to be handled by the Nginx Ingress Controller might have:
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: my-app-ingress
annotations:
kubernetes.io/ingress.class: "nginx" # This annotation specifies the controller
spec:
rules:
- host: myapp.example.com
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: my-app-service
port:
number: 80
This approach worked reasonably well for simple setups, allowing multiple Ingress controllers to coexist within a single cluster, each configured to watch for Ingress resources with a specific annotation value. For instance, an Nginx controller would watch for kubernetes.io/ingress.class: "nginx", while a Traefik controller might watch for kubernetes.io/ingress.class: "traefik".
However, as Kubernetes deployments became more sophisticated and the number of available Ingress controllers proliferated, several inherent limitations of using annotations became apparent:
- Vendor-Specific and Unstandardized: The
kubernetes.io/ingress.classannotation was a convention, not a formally defined API field. This meant that while widely adopted, it lacked the rigor and standardization of a first-class Kubernetes API object. Different controllers might interpret or expect different annotation values, leading to potential inconsistencies. - No Clear API Contract: Annotations are essentially key-value pairs for attaching arbitrary, non-identifying metadata to objects. They are not intended for core behavioral configuration. Relying on an annotation for such a critical routing decision felt like an abuse of the annotation's original purpose. It lacked an explicit schema or validation mechanism within the Kubernetes API.
- Collision Potential: If multiple Ingress controllers were configured to watch for the same annotation value (or if a misconfiguration occurred), it could lead to unexpected behavior, with multiple controllers attempting to configure routing for the same Ingress resource, resulting in race conditions or conflicting configurations.
- Difficult to Enforce and Discover: There was no declarative way to define the types of Ingress classes available in a cluster, nor to enforce which Ingress class an Ingress resource should use beyond a simple string match. Discovering available Ingress controllers and their respective annotation values often relied on documentation or convention, rather than an API-driven discovery mechanism.
- No Default Mechanism: There was no built-in way to define a "default" Ingress class that would be used if an Ingress resource did not specify the annotation. This often required custom admission controllers or manual intervention to ensure all Ingress resources were handled.
These limitations highlighted the need for a more robust, standardized, and API-driven approach to specify Ingress controller handling. The Kubernetes community recognized these challenges and began working towards a more declarative and extensible solution.
2.2 The Introduction of ingressClassName (API Field)
To address the shortcomings of the annotation-based approach, Kubernetes introduced a dedicated API field, ingressClassName, directly within the Ingress resource's spec. This significant enhancement debuted in Kubernetes 1.18 and was quickly backported to networking.k8s.io/v1 in Kubernetes 1.19, becoming the official and preferred method for specifying which Ingress controller should handle an Ingress resource.
The ingressClassName field is not just a simple string; it references a new cluster-scoped resource called IngressClass. This IngressClass resource acts as a declarative definition for an Ingress controller, providing a standardized way to describe its parameters and capabilities.
Here's how an Ingress resource typically looks with the ingressClassName field:
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: my-app-ingress
spec:
ingressClassName: nginx # This new field specifies the controller
rules:
- host: myapp.example.com
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: my-app-service
port:
number: 80
The introduction of ingressClassName and the IngressClass resource brought several key advantages:
- Standardized and Declarative:
ingressClassNameis a first-class API field, making it an official part of the Kubernetes API contract. This provides a standardized way for Ingress resources to declare their intended controller, reducing ambiguity and promoting consistency across different controllers and deployments. - Type-Safe and Validated: Being an API field,
ingressClassNamebenefits from Kubernetes API validation. It expects a reference to an existingIngressClassresource, making misconfigurations easier to detect. - Clear API Contract for Controllers: The
IngressClassresource itself provides a structured way for Ingress controllers to advertise their capabilities and specific configuration parameters. This improves discoverability and understanding. - Allows for Default IngressClass: The
IngressClassresource includes anisDefaultClassfield, enabling cluster administrators to designate a default Ingress controller. If an Ingress resource is created without specifying aningressClassName, and there's a defaultIngressClassdefined, that default will be automatically applied. This streamlines deployments for common use cases. - Improved Role Separation: The
IngressClassresource is typically managed by cluster administrators who provision and configure Ingress controllers, whileIngressresources are managed by application developers. This separation of concerns improves operational clarity.
To summarize the transition from annotations to ingressClassName, consider the following comparison:
| Feature/Aspect | kubernetes.io/ingress.class Annotation (Legacy) |
ingressClassName Field & IngressClass Resource (Modern) |
|---|---|---|
| Nature | Convention-based metadata | First-class API field referencing a dedicated API object (IngressClass) |
| API Contract | Implicit, vendor-specific interpretation | Explicit, standardized API contract with schema |
| Validation | None at the API level (runtime checks by controller) | API validation for existence of IngressClass |
| Discoverability | Relies on documentation or tribal knowledge | IngressClass objects are discoverable via API, clearly defining available classes |
| Defaulting | No built-in mechanism; often required custom admission controllers | IngressClass supports isDefaultClass: true for automatic defaulting |
| Role Separation | Blurry; annotation managed by whoever creates Ingress | Clear; IngressClass managed by cluster admin, Ingress by app developer |
| Flexibility | Limited to string matching | IngressClass can point to custom parameters for controller-specific configuration |
| Kubernetes Version | Pre-1.18 (still supported for backward compatibility, but deprecated) | 1.18+ (preferred and recommended) |
While the kubernetes.io/ingress.class annotation is still supported in many controllers for backward compatibility, it is officially deprecated. All new deployments and migrations should leverage the ingressClassName field and IngressClass resource for a more robust, maintainable, and future-proof approach to Ingress configuration. This evolution marks a significant step towards more declarative and standardized traffic management within Kubernetes.
3. Deep Dive into ingressClassName and IngressClass Resource
Having understood the evolutionary path, it's time to thoroughly examine the core components of the modern Ingress configuration: the IngressClass resource and the ingressClassName field. These two elements work in concert to provide a powerful and flexible mechanism for directing Ingress traffic.
3.1 The IngressClass Resource
The IngressClass is a cluster-scoped Kubernetes API resource introduced to formalize the definition of an Ingress controller. It serves as a central registry of available Ingress controller types and their associated configurations within a cluster. Instead of an arbitrary string in an annotation, ingressClassName now refers to the metadata.name of an IngressClass object.
A typical IngressClass definition looks like this:
apiVersion: networking.k8s.io/v1
kind: IngressClass
metadata:
name: nginx # The name that will be referenced by ingressClassName
spec:
controller: k8s.io/ingress-nginx # Identifier for the specific Ingress Controller
parameters:
apiGroup: k8s.example.com
kind: IngressParameters
name: nginx-params
isDefaultClass: true # Optional: Designate this as the default IngressClass
Let's dissect the key fields within the IngressClass resource:
metadata.name: This is the unique identifier for theIngressClassresource within the cluster. It's the string value that will be used in theingressClassNamefield of an Ingress object to associate it with this specific controller configuration. For example, ifmetadata.nameis "nginx", then an Ingress resource specifyingingressClassName: nginxwill be handled by the controller defined by thisIngressClass.spec.controller: This is a mandatory field that identifies the Ingress controller responsible for implementing thisIngressClass. The value is a string in the formatvendor.k8s.io/controller-name. This convention allows for uniqueness and provides a clear signal to Ingress controllers about whichIngressClassdefinitions they should monitor.- For the Nginx Ingress Controller, a common value is
k8s.io/ingress-nginx. - For Traefik, it might be
traefik.io/traefik. - Cloud-specific controllers will have their own identifiers, e.g.,
ingress.k8s.aws/albfor AWS ALB Ingress Controller. Ingress controllers running in the cluster watch forIngressClassresources whosespec.controllerfield matches their own identifier. This mechanism ensures that only the intended controller attempts to configure routing for Ingress resources associated with thatIngressClass.
- For the Nginx Ingress Controller, a common value is
spec.parameters(Optional): This field allows for controller-specific configuration that goes beyond the standard Ingress resource fields. It enables theIngressClassto point to a custom resource (CRD) that holds additional configuration for the associated Ingress controller.apiGroup: The API group of the custom resource.kind: The kind of the custom resource.name: The name of the custom resource instance.scope: (Optional,ClusterorNamespace) Specifies if the parameter resource is cluster-scoped or namespace-scoped. For example, an Nginx Ingress Controller might have a custom resource calledNginxIngressParameterswhere you define advanced load balancing algorithms, custom templates, or specific proxy settings. TheIngressClasswould then reference an instance of thisNginxIngressParametersresource. This design pattern offers immense flexibility, allowing controllers to expose their full range of features through a Kubernetes-native API, rather than relying on annotations or command-line flags.
spec.isDefaultClass(Optional): This boolean field is a convenience feature for cluster administrators. If set totruefor anIngressClass, it designates thatIngressClassas the default for the entire cluster. This means that any Ingress resource created without an explicitingressClassNamewill automatically be assigned to this defaultIngressClass.- It's crucial to note that only one
IngressClasscan be marked as default in a cluster. If multipleIngressClassresources haveisDefaultClass: true, Kubernetes will treat this as an invalid configuration, and defaulting will not occur. - Setting a default
IngressClasssimplifies the deployment of applications, as developers don't need to explicitly specifyingressClassNamefor common use cases.
- It's crucial to note that only one
The IngressClass resource centralizes the declaration of Ingress controller capabilities, making it easier for operators to manage different Ingress implementations and for developers to understand which Ingress options are available in their cluster.
3.2 The ingressClassName Field in the Ingress Resource
The ingressClassName field, located within the spec of an Ingress resource, is a string that explicitly declares which IngressClass (and by extension, which Ingress controller) should handle that particular Ingress. This field directly replaces the deprecated kubernetes.io/ingress.class annotation.
Here's an example of an Ingress resource leveraging ingressClassName:
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: api-service-ingress
namespace: my-app-namespace
spec:
ingressClassName: custom-api-gateway # References the IngressClass named "custom-api-gateway"
rules:
- host: api.example.com
http:
paths:
- path: /users
pathType: Prefix
backend:
service:
name: users-service
port:
number: 8080
- path: /products
pathType: Prefix
backend:
service:
name: products-service
port:
number: 8081
tls:
- hosts:
- api.example.com
secretName: api-tls-secret
In this example, the ingressClassName: custom-api-gateway field instructs the Kubernetes API that this specific Ingress resource should be managed by the Ingress controller associated with the IngressClass object named "custom-api-gateway". The Ingress controller running in the cluster will only process this Ingress if it's configured to handle the custom-api-gateway IngressClass.
Key aspects of ingressClassName:
- Mandatory for Non-Default Ingresses: If there's no default
IngressClassconfigured in the cluster, every Ingress resource must specify aningressClassName. Otherwise, it will remain unhandled. - Case Sensitivity: The value of
ingressClassNameis case-sensitive and must exactly match themetadata.nameof an existingIngressClassresource. - Immutability (Post-Creation): While you can create an Ingress without an
ingressClassNameand later add it (if no default exists), changing theingressClassNameafter an Ingress has been handled by a controller might lead to inconsistent states. It's generally best practice to define it at creation. - Controller Specific Behavior: While
ingressClassNamepoints to theIngressClass, the actual features and routing logic are implemented by the specific Ingress controller. TheIngressClassmerely provides the metadata for controller identification and optional custom parameter referencing.
3.3 The Relationship Between Ingress, IngressClass, and Ingress Controller
To fully grasp the mechanism, it's vital to understand the workflow and interdependencies between these three components:
- Cluster Administrator Deploys Ingress Controller(s): The administrator first deploys one or more Ingress controllers (e.g., Nginx Ingress Controller, Traefik, etc.) into the Kubernetes cluster. Each controller is configured with its own unique
spec.controlleridentifier. - Cluster Administrator Defines
IngressClassResources: For each deployed Ingress controller, or for different configurations of the same controller, the administrator createsIngressClassresources.- Each
IngressClasshas ametadata.name(e.g.,nginx,traefik-internal,cloud-alb). - It specifies
spec.controller(e.g.,k8s.io/ingress-nginx,traefik.io/traefik,ingress.k8s.aws/alb). - It may optionally include
spec.parametersto reference controller-specific configuration orspec.isDefaultClass: true.
- Each
- Ingress Controller Watches for
IngressClassandIngressResources: Each running Ingress controller constantly monitors the Kubernetes API for:IngressClassresources whosespec.controllerfield matches its own identifier.Ingressresources whosespec.ingressClassNamefield refers to anIngressClassthat it is responsible for.
- Application Developer Creates Ingress Resource: An application developer creates an
Ingressresource to expose their service.- They specify
spec.ingressClassNamewith themetadata.nameof the desiredIngressClass(e.g.,ingressClassName: nginx). - If no
ingressClassNameis specified, and a defaultIngressClassexists, Kubernetes will automatically populate theingressClassNamefield with the name of the defaultIngressClass.
- They specify
- Ingress Controller Processes the Ingress: When the appropriate Ingress Controller detects an
Ingressresource matching itsIngressClass(either explicitly specified or defaulted), it reads the routing rules from the Ingress object.- It then consults the
IngressClass(and any associatedparameterscustom resource) for controller-specific configuration. - Finally, it configures its underlying proxy or load balancer (e.g., Nginx, Envoy, cloud load balancer) to implement the specified routing.
- It then consults the
This structured relationship provides a clear, declarative, and extensible model for Ingress management in Kubernetes. It enables administrators to define multiple gateway configurations, each tailored to specific needs, and allows developers to easily select the appropriate gateway for their applications by simply setting the ingressClassName field. This robust system is foundational for managing complex external access patterns and paving the way for advanced API exposure strategies.
APIPark is a high-performance AI gateway that allows you to securely access the most comprehensive LLM APIs globally on the APIPark platform, including OpenAI, Anthropic, Mistral, Llama2, Google Gemini, and more.Try APIPark now! πππ
4. Practical Applications and Scenarios for ingressClassName
The true power of ingressClassName becomes evident when exploring its practical applications in real-world Kubernetes deployments. It unlocks a realm of flexibility, allowing organizations to tailor their external access solutions to specific needs, optimize resource usage, and enhance the overall resilience of their applications.
4.1 Running Multiple Ingress Controllers in a Single Cluster
One of the most common and compelling use cases for ingressClassName is the ability to run multiple, distinct Ingress controllers within the same Kubernetes cluster. This scenario arises when different applications or teams have varying requirements for their external traffic management, or when an organization needs to leverage the unique strengths of different controllers.
Why run multiple controllers?
- Feature Specialization: One controller might excel at certain features (e.g., Nginx for advanced URL rewriting and header manipulation), while another might be better suited for different tasks (e.g., Traefik for dynamic service discovery and simple internal routing, or a cloud-provider specific controller for deep integration with cloud services).
- Performance and Isolation: For highly critical or high-traffic APIs, you might want a dedicated, optimized Ingress controller to ensure performance isolation and prevent noisy neighbors. Less critical internal applications might use a more lightweight or shared controller.
- Security Profiles: Different applications might require different security postures. One Ingress controller could be configured with stricter WAF (Web Application Firewall) rules for public-facing applications, while another handles internal APIs with less stringent requirements.
- Cost Optimization: Cloud-specific Ingress controllers (like AWS ALB or GCP GCLB) can be expensive per instance. You might want to use a single cloud load balancer for all public Ingresses via its controller, but use a cheaper, open-source controller (like Nginx) for internal-only Ingresses that don't need a public IP.
- Team Autonomy/Legacy: Different development teams might prefer or be locked into specific Ingress controller technologies.
ingressClassNameallows them to deploy their preferred solution without impacting other teams.
How to set it up:
To achieve this, you would deploy each Ingress controller as a separate set of Pods, Deployments, and Services. Critically, each controller instance must be configured to process only a specific IngressClass.
Let's illustrate with an example:
- Deploy Nginx Ingress Controller: Configure the Nginx Ingress Controller to watch for
IngressClassresources withspec.controller: k8s.io/ingress-nginx. Create anIngressClassfor it:yaml # nginx-ingress-class.yaml apiVersion: networking.k8s.io/v1 kind: IngressClass metadata: name: nginx spec: controller: k8s.io/ingress-nginx isDefaultClass: true # Let's make Nginx the default - Deploy Traefik Ingress Controller: Configure the Traefik Ingress Controller to watch for
IngressClassresources withspec.controller: traefik.io/traefik. Create a separateIngressClassfor it:yaml # traefik-ingress-class.yaml apiVersion: networking.k8s.io/v1 kind: IngressClass metadata: name: traefik-internal spec: controller: traefik.io/traefik # No isDefaultClass, as Nginx is already the default - Deploy Ingress Resources: Applications needing Nginx features (or simply relying on the default) would use: ```yaml apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: public-website-ingress spec: # ingressClassName: nginx # This would be inferred from the default rules:
- host: www.mycompany.com http: paths:
- path: / pathType: Prefix backend: service: name: frontend-service port: number: 80
Applications needing Traefik for internal **API**s (or specific Traefik features) would explicitly specify:yaml apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: internal-api-ingress spec: ingressClassName: traefik-internal # Explicitly choose Traefik rules:
- path: / pathType: Prefix backend: service: name: frontend-service port: number: 80
- host: internal.api.mycompany.com http: paths:
- path: /data pathType: Prefix backend: service: name: data-api-service port: number: 8080 ``` This setup ensures that each Ingress resource is handled by precisely the controller intended for it, providing maximum flexibility and control over traffic routing.
- host: www.mycompany.com http: paths:
4.2 Providing Different Traffic Management Policies
Beyond simply selecting a different controller, ingressClassName can also be used to apply varying traffic management policies even with the same underlying Ingress controller type. This is primarily achieved through the spec.parameters field within the IngressClass resource, which allows referencing controller-specific custom resources.
Scenario: Imagine you have a critical set of APIs that require extreme performance and resilience, with aggressive timeouts and circuit breakers, while other general-purpose web applications can tolerate more relaxed settings.
- Apply to Ingress Resources: Critical APIs would use
ingressClassName: high-performance-nginx, while other services would useingressClassName: default-nginx(or rely on the default). This allows for fine-grained control over the underlying proxy configuration without modifying the Ingress controller deployment itself.
Create Multiple IngressClass Resources Referencing Different Parameters:```yaml
ingress-class-high-perf.yaml
apiVersion: networking.k8s.io/v1 kind: IngressClass metadata: name: high-performance-nginx spec: controller: k8s.io/ingress-nginx parameters: apiGroup: k8s.example.com kind: NginxParameters name: performance-tuning # References the high-performance CR ``````yaml
ingress-class-default.yaml
apiVersion: networking.k8s.io/v1 kind: IngressClass metadata: name: default-nginx spec: controller: k8s.sio/ingress-nginx parameters: apiGroup: k8s.example.com kind: NginxParameters name: default-tuning # References the default CR isDefaultClass: true ```
Define Custom Parameters (Example with Nginx): First, the Ingress controller would need to support custom parameters via a CRD. For Nginx Ingress Controller, this might involve using a hypothetical NginxParameters CRD.```yaml
nginx-performance-params.yaml
apiVersion: k8s.example.com/v1 kind: NginxParameters # A custom resource for Nginx specific config metadata: name: performance-tuning spec: proxyReadTimeout: "60s" proxySendTimeout: "60s" clientMaxBodySize: "50m" # ... other performance-related Nginx directives ``````yaml
nginx-default-params.yaml
apiVersion: k8s.example.com/v1 kind: NginxParameters metadata: name: default-tuning spec: proxyReadTimeout: "30s" proxySendTimeout: "30s" clientMaxBodySize: "10m" # ... ```
This mechanism extends beyond performance tuning to areas like security headers, caching policies, rate limiting, and more, provided the Ingress controller supports defining these via custom resources.
4.3 Environment-Specific Ingress Controllers
In modern development workflows, it's common to have multiple environments (e.g., development, staging, production), each with its own Kubernetes cluster or distinct namespaces within a cluster. ingressClassName facilitates environment-specific Ingress configurations, even when using the same controller type.
Scenario: In a development environment, you might prioritize quick deployments and debugging, potentially using HTTP-only Ingresses or self-signed certificates. In production, however, strict TLS, WAF integration, and robust monitoring are paramount.
- Production
IngressClass:yaml # prod-ingress-class.yaml apiVersion: networking.k8s.io/v1 kind: IngressClass metadata: name: prod-nginx spec: controller: k8s.io/ingress-nginx # This IngressClass might point to an Nginx controller configured for production # with specific external IP ranges, robust TLS settings, and potentially integration # with a WAF or DDoS protection service via its parameters or direct configuration. # For example, it might use parameters that enforce HTTP-to-HTTPS redirects # and specific cipher suites. - Development
IngressClass:yaml # dev-ingress-class.yaml apiVersion: networking.k8s.io/v1 kind: IngressClass metadata: name: dev-nginx spec: controller: k8s.io/ingress-nginx # This IngressClass might point to an Nginx controller in a dev environment, # configured to run on smaller nodes, potentially without public IPs, # or with relaxed TLS requirements (e.g., self-signed certs for local testing). # It might not enforce HTTP-to-HTTPS redirects by default.By deploying differentIngressClassresources (each potentially backed by a differently configured Ingress controller instance or different customparametersresources) in different environments, developers can ensure their applications are exposed with the appropriate settings for each stage of their lifecycle. This reduces the risk of misconfiguration and enhances consistency between environments.
4.4 Implementing Advanced API Gateway Features with Ingress Controllers
Ingress controllers, by their very nature, act as a gateway for external HTTP/HTTPS traffic into the Kubernetes cluster. They handle basic routing, load balancing, and TLS termination, making them a foundational component for exposing APIs. However, the term "API Gateway" often implies a broader set of features, including authentication, authorization, rate limiting, request/response transformation, API versioning, API analytics, and developer portals.
While standard Ingress controllers provide excellent capabilities for L7 routing, they typically offer only a subset of these advanced API gateway features. Some advanced Ingress controllers (like Nginx Ingress with its commercial version, or certain Envoy-based controllers) extend their functionality through custom annotations or specific custom resources to provide some of these enhanced capabilities.
For example, an Ingress controller might offer: * Rate Limiting: Annotations or parameters to limit the number of requests per client IP over a given period. * Authentication: Integration with external authentication services (e.g., OAuth2 proxy) or basic authentication mechanisms. * Traffic Splitting/Canary Deployments: Routing a percentage of traffic to a new version of a service based on headers or cookies. * Request/Response Transformation: Modifying headers or body content before forwarding to the backend.
The ingressClassName mechanism allows you to select which "flavour" of API gateway functionality an Ingress should receive. You could define:
IngressClass: standard-web: For typical web applications, basic routing, TLS termination.IngressClass: rate-limited-api: For public APIs, configured with rate limiting policies via custom parameters.IngressClass: authenticated-api: For internal APIs requiring external authentication, again leveraging custom parameters or specific controller configurations.
This allows organizations to leverage different ingress controllers or different configurations of the same controller to serve distinct API and application traffic, each with its own set of gateway policies. This approach helps in categorizing and segmenting the exposure of various APIs based on their requirements.
However, it's crucial to acknowledge that even with ingressClassName and controller-specific extensions, standard Ingress controllers may not fully meet the demands of comprehensive API management, especially for complex microservice architectures, multi-tenant environments, or those integrating with emerging technologies like AI. For these advanced scenarios, dedicated API management platforms that go beyond simple traffic routing are often required.
This is where a product like APIPark comes into play. While ingressClassName helps select which ingress controller acts as a basic gateway for HTTP/HTTPS traffic, for sophisticated API governance, full lifecycle management, and integration with modern paradigms such as AI models, a dedicated platform like APIPark provides a far richer set of features. APIPark is an open-source AI gateway and API management platform designed to help developers and enterprises manage, integrate, and deploy AI and REST services with ease. It extends the fundamental gateway concept by offering quick integration of 100+ AI models, a unified API format for AI invocation, prompt encapsulation into REST APIs, end-to-end API lifecycle management, API service sharing within teams, independent API and access permissions for each tenant, and robust performance rivaling Nginx. For businesses requiring detailed API call logging, powerful data analysis, and advanced security features like subscription approval, APIPark offers a comprehensive solution that moves beyond the basic routing capabilities of an Ingress controller, providing a true API gateway experience tailored for modern enterprise needs.
In essence, ingressClassName helps you choose your front door. For a simple house, any good front door is fine. But if your "house" is a complex API ecosystem, especially one integrating AI services, you need a whole security system, a reception area, and dedicated management staff β that's the role of a comprehensive API gateway and management platform like APIPark. Both are essential, but they operate at different layers of abstraction and provide different scopes of functionality.
5. Best Practices and Considerations
Effectively leveraging ingressClassName in a Kubernetes environment requires not just technical understanding, but also adherence to best practices and careful consideration of various operational aspects. These practices ensure maintainability, scalability, and security of your external traffic management.
5.1 Choosing the Right Ingress Controller
The choice of Ingress controller is arguably the most critical decision when setting up external access. It directly impacts the features available, performance characteristics, and ease of management.
Factors to consider:
- Features: Do you need advanced routing rules, specific authentication methods, WebSocket support, traffic splitting, API gateway features (like rate limiting, request transformation), or deep observability? Different controllers offer varying levels of these features. For example, if you require a sophisticated API gateway with AI integration and lifecycle management, you might consider how the chosen Ingress controller could integrate with solutions like APIPark, which provides these capabilities out-of-the-box.
- Performance and Scalability: How much traffic are you expecting? What are your latency requirements? Some controllers are highly optimized for high-throughput scenarios, while others might be simpler but less performant under heavy load.
- Cloud Integration: If running on a specific cloud provider (AWS, GCP, Azure), native cloud Ingress controllers (e.g., AWS ALB Ingress Controller, GKE Ingress) offer seamless integration with cloud load balancers, WAFs, and other services. This can simplify operations and leverage existing cloud infrastructure.
- Community Support and Maturity: Opt for controllers with active development, good documentation, and a strong community, as this ensures ongoing maintenance, bug fixes, and readily available support.
- Configuration Management: How easy is it to configure the controller? Does it rely on annotations, custom resources, or a mix?
ingressClassNameandIngressClassprovide a standardized API, but the underlying controller's configuration mechanism still matters. - Operational Overhead: Consider the complexity of deploying, monitoring, and troubleshooting the controller. Some controllers might be simpler to set up but harder to debug, or vice versa.
It's often beneficial to benchmark different controllers against your specific workload to make an informed decision. Remember that ingressClassName allows you to mix and match controllers, so you don't have to commit to just one for your entire cluster.
5.2 Defining IngressClass Resources Clearly
Well-defined IngressClass resources are crucial for clarity and preventing misconfigurations.
- Descriptive Naming: Choose clear and intuitive names for your
IngressClassresources (e.g.,nginx-public-prod,traefik-internal-dev,gce-premium-api). The name should immediately convey its purpose or the type of traffic it handles. - Meaningful
spec.controller: Ensure thespec.controllerfield correctly identifies the controller. While Kubernetes doesn't strictly validate this string, controllers rely on it to identify their domain. Using the recommendedvendor.k8s.io/controller-nameformat is best practice. - Document
parameters: If using thespec.parametersfield to reference custom resources, ensure these custom resources are well-documented. Their purpose, configurable options, and implications should be clear to anyone using the associatedIngressClass. - RBAC for
IngressClass: Control who can create and modifyIngressClassresources. Typically, this should be restricted to cluster administrators, asIngressClassdefinitions represent fundamental networking policies.
5.3 Setting a Default IngressClass
Setting a default IngressClass can significantly streamline deployments and reduce cognitive load for application developers.
- Simplify Common Deployments: For the majority of applications that don't require specialized routing, not having to specify
ingressClassNamemakes their Ingress definitions cleaner and simpler. - Prevent Unhandled Ingresses: If no
ingressClassNameis specified and no defaultIngressClassexists, Ingress resources will remain unhandled, leading to applications being inaccessible. A default prevents this common pitfall. - Strategic Choice: Choose the most common or generally suitable Ingress controller for your cluster as the default. This often means the one that's most stable, performant for general use, and easiest to manage.
- Monitor for Defaults: Be aware that Ingress resources created without an explicit
ingressClassNamewill be automatically assigned the default. Ensure this behavior is desired for all such Ingresses.
5.4 Security Implications
Ingress controllers are at the perimeter of your cluster, making them a critical security boundary. ingressClassName has indirect but important security implications.
- Isolating Traffic: By running multiple Ingress controllers, you can isolate different types of traffic. For example, a public-facing API gateway controller can be hardened with specific security policies (e.g., WAF integration, stricter rate limiting, aggressive bot protection) through its
IngressClassparameters or direct configuration, while an internal-only controller can have more relaxed rules. This prevents a misconfiguration or vulnerability in one traffic path from affecting another. - TLS Management: All Ingress controllers should be configured to handle TLS termination securely. Ensure correct certificates (from Cert-Manager or other CAs) are used, strong cipher suites are enforced via
IngressClassparameters or controller configuration, and HTTP-to-HTTPS redirects are in place for production Ingresses. - RBAC for Ingress and IngressClass: Implement strict Role-Based Access Control (RBAC) policies.
- Application developers should have permissions to create
Ingressresources but might be restricted on whichingressClassNamevalues they can use, or only allowed to use the default. - Only cluster administrators should have the ability to create, modify, or delete
IngressClassresources, as these define fundamental routing infrastructure.
- Application developers should have permissions to create
- Vulnerability Management: Regularly update your Ingress controllers to the latest stable versions to benefit from security patches and bug fixes. Running outdated controllers can expose your cluster to known vulnerabilities.
5.5 Monitoring and Troubleshooting
Effective monitoring and troubleshooting are essential for maintaining the health and performance of your Ingress setup.
- Controller Logs: The logs of your Ingress controller Pods are your first line of defense. They provide insights into configuration reloads, routing errors, and issues communicating with backend services.
- Ingress Resource Status: Always check the
statusfield of your Ingress resources. Controllers update this field with the load balancer IP/hostname and any relevant conditions or errors. If an Ingress is stuck without an address, it indicates a problem with the controller processing it. - Metrics: Most Ingress controllers expose Prometheus-compatible metrics. Monitor key metrics such as:
- Request rates, latency, and error rates per route/service.
- Controller configuration reload times.
- Resource utilization (CPU, memory) of controller Pods.
- Number of
Ingressresources successfully processed versus those with errors.
- Network Flow: Use network debugging tools within your cluster (e.g.,
curlfrom a Pod,kubectl execinto the controller Pod) to verify network connectivity to backend services. - Configuration Validation: If using custom
parameterswith yourIngressClass, ensure that the custom resources are correctly defined and that the controller is properly interpreting them. - Event Logs: Check Kubernetes events (
kubectl describe ingress <ingress-name>) for warnings or errors related to Ingress processing.
By adhering to these best practices, you can build a highly reliable, secure, and performant external access layer for your Kubernetes applications, leveraging the full potential of ingressClassName for flexible traffic management.
6. Beyond Ingress: Gateway API and Future Directions
While ingressClassName significantly improved the Ingress API, the Kubernetes community recognized that Ingress still had limitations, especially for advanced API gateway use cases and the desire for more role-oriented and expressive networking APIs. This led to the development of the Gateway API, a powerful and flexible evolution designed to address these challenges and define the future of service networking in Kubernetes.
6.1 Introduction to Gateway API
The Gateway API is a collection of API resources that model service networking in Kubernetes. It aims to provide more expressive, extensible, and role-oriented interfaces for various traffic management concerns, from simple HTTP routing to complex L4/L7 load balancing. It seeks to standardize capabilities that often required vendor-specific annotations or custom resources with the older Ingress API.
The core motivation behind the Gateway API includes:
- Role-Oriented Design: It clearly separates concerns between infrastructure providers/cluster operators (who manage the underlying network infrastructure), gateway administrators (who configure the entry points and broad policies), and application developers (who define routing for their services). This improves operational clarity and security.
- Extensibility: It's designed to be highly extensible, allowing different gateway implementations to offer unique features while maintaining a common core API. This is crucial for supporting a diverse ecosystem of load balancers, proxies, and service meshes.
- Portability: It aims for better portability of advanced traffic management features across different implementations and cloud providers, reducing vendor lock-in compared to annotation-heavy Ingress configurations.
- Expressiveness: It supports more advanced routing capabilities natively, such as weighted traffic splitting, header-based routing, more granular match conditions, and support for TCP, UDP, and TLS routing beyond just HTTP/HTTPS.
The Gateway API introduces several new resources, which are typically installed as Custom Resource Definitions (CRDs):
GatewayClass: This resource is the spiritual successor toIngressClass. It defines a class of Gateways, indicating the controller that will manageGatewayresources of this class. It contains controller-specific configuration.Gateway: This resource defines a point in the network that forwards traffic. It specifies listeners (ports, protocols, hostnames) and references aGatewayClass. AGatewayrepresents a configurable load balancer or API gateway instance.HTTPRoute: Defines rules for routing HTTP/HTTPS traffic from aGatewayto Kubernetes Services. It offers richer matching and action capabilities (e.g., path, header, query param matching; weighted backend traffic splitting, request/response modification).TCPRoute,TLSRoute,UDPRoute: These resources extend routing capabilities beyond HTTP, allowing for more comprehensive L4 and L7 traffic management.- Policy Attachment: The Gateway API also emphasizes a flexible policy attachment model, allowing users to apply policies (e.g., authentication, authorization, rate limiting) to
Gateway,HTTPRoute, or evenServiceresources in a modular way.
This new set of APIs provides a much more robust and future-proof foundation for managing external and internal traffic in Kubernetes, addressing many of the architectural limitations of the original Ingress API.
6.2 How Gateway API Relates to Ingress and ingressClassName
The Gateway API is not a direct replacement for Ingress in the sense that it deprecates and immediately removes it. Instead, it is an evolution that aims to provide a superior alternative for more advanced use cases.
GatewayClassvs.IngressClass: TheGatewayClassresource is the direct conceptual successor toIngressClass. Both serve to identify a controller and potentially its parameters. However,GatewayClassis designed with greater extensibility and role separation in mind. WhileingressClassNamereferences anIngressClassto pick a controller for an Ingress rule,GatewayClassis used by a Gateway resource to pick a controller that provisions a specific Gateway instance.Gatewayvs.Ingress: AGatewayresource is a more powerful and flexible abstraction than anIngressresource.- An
Ingressresource defines a set of routing rules and implicitly assumes a single entry point (the Ingress controller). - A
Gatewayresource explicitly defines the network entry point (listeners, ports, protocols, IP addresses), separating this infrastructure concern from the routing rules themselves. This allows for multipleGatewayinstances to be provisioned by a single controller, each with distinct listener configurations.
- An
- Continued Relevance of
ingressClassName: For existing deployments and simpler use cases, theIngressAPI withingressClassNameremains perfectly valid and continues to be supported. Many organizations will likely use Ingress for less complex applications for the foreseeable future, especially if their chosen controller provides sufficient functionality. The Gateway API is designed to address the scale and complexity that Ingress struggles with, not necessarily to replace every single Ingress instance overnight. - Migration Path: Controllers that support both Ingress and Gateway API often provide clear migration paths. Developers can gradually adopt the Gateway API for new services or for services that require its advanced features, while existing Ingresses continue to function.
The Gateway API represents a significant step forward in Kubernetes networking, offering a more structured, extensible, and powerful approach to traffic management. It acknowledges the need for dedicated API gateway capabilities directly within the Kubernetes ecosystem, moving beyond the simpler HTTP routing capabilities of the original Ingress.
6.3 Advantages of Gateway API
The design of the Gateway API brings several key advantages that make it a compelling choice for future Kubernetes networking:
- Role-Oriented: It cleanly separates infrastructure concerns (managed by network operators) from application routing concerns (managed by developers). This improves security, prevents accidental misconfigurations, and allows teams to operate within their defined responsibilities.
- More Expressive Routing: It provides much finer-grained control over traffic routing. For instance,
HTTPRoutesupports multiple rule matches (e.g., matching on headers and paths), weighted traffic splitting for canary deployments, direct backend references, and more sophisticated HTTP manipulation. - Multi-Protocol Support: Unlike Ingress which is primarily for HTTP/HTTPS, Gateway API natively supports TCP, TLS, and UDP routing, making it suitable for a broader range of applications and services.
- Extensibility: The API is designed with extensibility at its core. Implementations can add custom filters and parameters in a standardized way without resorting to proprietary annotations. This fosters innovation while maintaining portability.
- Better Multi-tenancy: The clear separation of
Gateway(controlled by infrastructure teams) andHTTPRoute(controlled by application teams) makes it easier to implement secure multi-tenant environments where different teams can manage their routing without affecting the shared gateway infrastructure. - Standard for Advanced Features: It aims to standardize advanced features that were previously implemented in ad-hoc, vendor-specific ways through annotations. This includes common API gateway patterns such as rate limiting, authentication, and traffic transformation.
In conclusion, while ingressClassName remains a crucial part of managing Ingress in Kubernetes today, especially for selecting among different gateway implementations or configurations, the Gateway API represents the future. It offers a more robust, flexible, and comprehensive framework for service networking and API gateway functionalities within Kubernetes, designed to meet the increasing demands of complex, cloud-native applications. Understanding both is key to building resilient and scalable Kubernetes infrastructure.
Conclusion
Our extensive exploration into "Understanding Ingress Control Class Name in Kubernetes" has traversed a comprehensive landscape, from the foundational principles of Kubernetes Ingress to the nuanced intricacies of its modern configuration. We began by solidifying our understanding of the Ingress resource and the critical role played by the Ingress Controller β the actual workhorse that translates declarative rules into active traffic management, acting as the primary gateway for external access to your services.
We then delved into the evolutionary journey of Ingress configuration, highlighting the limitations of early annotation-based approaches and celebrating the pivotal introduction of ingressClassName. This new API field, coupled with the IngressClass resource, emerged as a standardized, declarative, and extensible solution, addressing the shortcomings of its predecessors and bringing much-needed clarity to the process of designating Ingress controllers. The IngressClass resource, with its controller, parameters, and isDefaultClass fields, now serves as the authoritative blueprint for defining how different types of Ingress traffic should be handled.
The practical applications of ingressClassName underscored its immense value. We saw how it empowers organizations to run multiple Ingress controllers concurrently, each tailored to specific needs for performance, security, or feature sets. It enables the implementation of diverse traffic management policies, allowing for fine-grained control over routing behaviors, even with the same underlying controller type, through the clever use of custom parameters. Furthermore, it facilitates environment-specific configurations, ensuring that development, staging, and production environments adhere to their distinct operational requirements. We also explored how Ingress controllers, leveraging ingressClassName, can function as basic API gateways, routing and managing API traffic effectively. For more advanced API management requirements, integrating with platforms like APIPark becomes essential, providing comprehensive API gateway features, AI model integration, and a full lifecycle management experience that extends far beyond the scope of a standard Ingress controller.
Throughout this journey, we emphasized the importance of best practices β from judiciously selecting the right Ingress controller and clearly defining IngressClass resources to establishing a default for simplicity and robustly addressing security implications. Effective monitoring and troubleshooting techniques were also highlighted as indispensable tools for maintaining the health and reliability of your Ingress infrastructure.
Finally, we cast our gaze towards the future with the introduction of the Gateway API. While ingressClassName remains a vital component for current Ingress deployments, the Gateway API heralds a new era of Kubernetes networking, offering a more expressive, role-oriented, and extensible framework for advanced service and API gateway management. It addresses many of the architectural limitations of Ingress, promising greater portability and a richer feature set for orchestrating traffic in increasingly complex cloud-native environments.
In conclusion, ingressClassName is more than just a configuration field; it is a fundamental enabler for building sophisticated, multi-faceted, and resilient external access layers in Kubernetes. It empowers administrators with precise control and provides developers with a clear, declarative mechanism for exposing their applications. As the Kubernetes ecosystem continues to evolve, understanding ingressClassName is not merely about managing traffic today, but about laying a robust foundation for navigating the future of service networking and API governance.
5 FAQs about Ingress Control Class Name in Kubernetes
1. What is the primary purpose of ingressClassName in Kubernetes? The primary purpose of ingressClassName is to explicitly specify which IngressClass resource (and by extension, which Ingress Controller) should be responsible for handling a particular Ingress object. This allows for running multiple Ingress controllers in a single cluster and provides a standardized, API-driven way to choose the correct traffic management implementation for an application's external access. It replaced the older, annotation-based method (kubernetes.io/ingress.class).
2. What is an IngressClass resource, and how does it relate to ingressClassName? An IngressClass is a cluster-scoped Kubernetes resource that formally defines an Ingress Controller's capabilities and parameters. It includes the spec.controller field, which uniquely identifies the Ingress Controller responsible for it, and optionally spec.parameters to reference controller-specific configuration. The ingressClassName field in an Ingress resource directly references the metadata.name of an IngressClass resource, establishing a clear link between the desired routing rules and the controller meant to enforce them.
3. Can I use multiple Ingress Controllers in a single Kubernetes cluster? If so, how does ingressClassName help? Yes, ingressClassName makes it straightforward to run multiple Ingress Controllers in a single cluster. Each Ingress Controller instance is configured to watch for specific IngressClass resources. By creating distinct IngressClass resources (e.g., nginx-public, traefik-internal) and then setting the ingressClassName field in your Ingress objects accordingly, you can direct different Ingress resources to be handled by different controllers, leveraging their unique features or isolating traffic.
4. What are the advantages of using ingressClassName over the deprecated kubernetes.io/ingress.class annotation? ingressClassName offers several key advantages: it's a first-class API field, making it standardized and type-safe with API validation; it provides a clear API contract for controllers via the IngressClass resource; it enables the declaration of a default Ingress controller for the cluster; and it allows for more sophisticated, controller-specific configurations through the spec.parameters field in IngressClass, moving beyond simple string-based matching of annotations.
5. How does ingressClassName relate to the new Gateway API, and which should I use? The Gateway API is a next-generation evolution of service networking in Kubernetes, offering more expressive, role-oriented, and extensible capabilities than Ingress. The GatewayClass resource in Gateway API is the spiritual successor to IngressClass. While the Gateway API is generally recommended for complex or future-proof deployments requiring advanced API gateway features, ingressClassName and the Ingress API remain fully supported and suitable for existing deployments or simpler HTTP/HTTPS routing needs. You can use both concurrently and migrate gradually. For comprehensive API management including AI integration and full lifecycle, platforms like APIPark complement the underlying Ingress/Gateway API mechanisms.
πYou can securely and efficiently call the OpenAI API on APIPark in just two steps:
Step 1: Deploy the APIPark AI gateway in 5 minutes.
APIPark is developed based on Golang, offering strong product performance and low development and maintenance costs. You can deploy APIPark with a single command line.
curl -sSO https://download.apipark.com/install/quick-start.sh; bash quick-start.sh

In my experience, you can see the successful deployment interface within 5 to 10 minutes. Then, you can log in to APIPark using your account.

Step 2: Call the OpenAI API.

