withIngressAnnotation

Method
📦 Aspire.Hosting.Kubernetes v17.0.0
interface KubernetesIngressResource {
// ... omitted for brevity
withIngressAnnotation(
key: string,
value: string): KubernetesIngressResource;
}

Signature

methodwithIngressAnnotationbuilder
Adds a Kubernetes metadata annotation to the generated Ingress resource. These are key-value pairs in the `metadata.annotations` field of the K8S Ingress, commonly used to configure ingress controller-specific behavior.
withIngressAnnotation(
key: string,
value: string): KubernetesIngressResource
keystringThe annotation key (e.g., `"nginx.ingress.kubernetes.io/rewrite-target"`).
valuestringThe annotation value.
KubernetesIngressResource

Applies to

This method applies to the following types: