Repositories
v1v
Published by: Kubernetes2Updated

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.

v1
services
|

Authentication

Add API authentication details

HEADERS
X-APIKEY
string
Send X-APIKEY in Header

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

  1. Modularity: The template is divided into multiple sections, each with its own facet:
{
  "spec": {
    "ingressClassName": "{{ __ING_ID__.spec.ingressClassName }}"
  },
  "facets": [
    "addon:spec",
    "addon:ingressclassname"
  ]
}
  1. Flexibility: The use of the __ING_ID__ variable allows for dynamic population of all Ingress fields.
  2. 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"
  ]
}
  1. Optional Components: By using separate facets for different spec components, users can easily include or exclude parts of the Ingress configuration as needed.

  2. Extensibility: The facet-based approach allows for easy addition of new fields or features in future Kubernetes versions.

  3. 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 -
POST/apis/repos/kubernetes/service-resources/v1/resources/collections/ingress/exec
REQUEST
QUERY-STRING PARAMETERS
format
string
No sources available.
API Server https://configfacets.com
API Key
Not set
RESPONSES
No content available.