Services Resources - v1 offers a comprehensive suite of templates for Kubernetes Service resources, including Service, Endpoints, Ingress, and IngressClass, enabling efficient management of network services and traffic routing in clusters. These templates utilize a flexible, facet-based design with dynamic variable population, streamlining the creation and configuration of service-related resources while accommodating a wide range of networking scenarios in Kubernetes environments.
Authentication
Add API authentication details
Readme
User instructions for this resource
The Ingress template in ConfigFacets is designed to create and manage Kubernetes Ingress resources, which provide HTTP and HTTPS routing from outside the cluster to services within the cluster.
Key aspects of the template design
- Modularity: The template is divided into multiple sections, each with its own facet:
{
"spec": {
"ingressClassName": "{{ __ING_ID__.spec.ingressClassName }}"
},
"facets": [
"addon:spec",
"addon:ingressclassname"
]
}
- Flexibility: The use of the
variable allows for dynamic population of all Ingress fields.__ING_ID__
- Comprehensive Coverage: The template includes all major components of an Ingress resource, including TLS configuration and routing rules:
{
"spec": {
"tls": "{{ __ING_ID__.spec.tls }}",
"rules": "{{ __ING_ID__.spec.rules }}"
},
"facets": [
"addon:spec",
"addon:tls",
"addon:rules"
]
}
Optional Components: By using separate facets for different spec components, users can easily include or exclude parts of the Ingress configuration as needed.
Extensibility: The facet-based approach allows for easy addition of new fields or features in future Kubernetes versions.
Consistency: The template follows the same structure as other ConfigFacets templates, maintaining a consistent user experience across different resource types.
Examples
Check Request Body tab section to play around with interactive examples.
Install(
)Example
The Curl tab in the request section below provides the curl command for your resource.
curl -s -X POST "https://configfacets.com/apis/repos/kubernetes/service-resources/v1/resources/collections/ingress/exec?format=json" -d '{"facets":["master","addon:spec","addon:rules"],"values":{"basic_ing":{"spec":{"rules":[{"http":{"paths":[{"path":"/testpath","backend":{"service":{"name":"test","port":{"number":80}}},"pathType":"Prefix"}]}}]},"metadata":{"name":"minimal-ingress","annotations":{"nginx.ingress.kubernetes.io/rewrite-target":"/"}}}},"globalvars":{"__ING_ID__":"basic_ing"}}' | kubectl apply -f -