MYHOSPITALNOW.COM

Find Trusted Doctors & Hospitals

Discover healthcare providers, compare hospitals, and explore treatment options worldwide.

Free Treatment Quotes • Doctor Search • Hospital Comparison

Find Healthcare Options

www.myhospitalnow.com

Kubernetes: Understanding IngressClassParams, IngressClass & Ingress


1. Understanding the Role of Each Resource

IngressClassParams

A Custom Resource Definition (CRD) used with the AWS Load Balancer Controller. It defines AWS-specific settings for your ALBโ€”like scheme (internet-facing/internal), IP address type (IPv4 or dualstack), tags, and grouping.


Template example:

apiVersion: elbv2.k8s.aws/v1beta1
kind: IngressClassParams
metadata:
  name: alb
spec:
  scheme: internet-facing
  ipAddressType: ipv4
  tags:
    - key: env
      value: dev

This instructs the AWS ALB controller how to configure the load balancer.
(kubernetes-sigs.github.io, AWS Documentation)


IngressClass

A standard Kubernetes object that tells the cluster who manages Ingress resources. It references the IngressClassParams and names the AWS controller responsible for provisioning the ALB.

apiVersion: networking.k8s.io/v1
kind: IngressClass
metadata:
  name: alb
  annotations:
    ingressclass.kubernetes.io/is-default-class: "true"
spec:
  controller: eks.amazonaws.com/alb
  parameters:
    apiGroup: eks.amazonaws.com
    kind: IngressClassParams
    name: alb

This links your Ingress resources to the right AWS-specific settings.
(AWS Documentation, kubernetes-sigs.github.io)


Ingress

The user-facing Kubernetes object that defines HTTP routing rulesโ€”like host, paths, and backend services. It refers to the IngressClass by name (unless one is marked default).

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: my-app-ingress
spec:
  ingressClassName: alb              # Connects to your IngressClass
  rules:
    - host: myapp.example.com
      http:
        paths:
          - path: /
            pathType: Prefix
            backend:
              service:
                name: my-app-service
                port:
                  number: 80
Code language: PHP (php)

Once applied, AWS provisions an ALB to route traffic as specified.
(AWS Documentation, solo.io)


2. High-Level Flow (Step-by-Step)

  1. Deploy AWS Load Balancer Controller on your cluster via Helm or manifests (not covered here, but essential).
  2. Create IngressClassParams โ†’ defines ALB behavior.
  3. Create IngressClass โ†’ registers a class that uses the AWS controller and links to the params.
  4. Deploy Ingress resources โ†’ use the class to route traffic; AWS controller builds the ALB behind the scenes.
    (AWS Documentation, Amazon Web Services, Inc.)

3. Best Beginner Tutorials

  • AWS Official IngressClass Workflow: A clear, step-by-step guide illustrating exactly these four stepsโ€”workload, IngressClassParams, IngressClass, then Ingress. Super beginner-friendly.
    (AWS Documentation)
  • AWS Load Balancer Controller on EKS โ€“ Complete Guide: A deep-dive tutorial covering setup of the controller, cluster, and walkthrough of ALB provisioning.
    (devopscube.com)
  • Kubernetes Ingress Fundamentals: For broader understanding of Ingress and how controllers work (like nginx). Excellent for seeing the big picture.
    (devopscube.com, tetrate.io)

4. TL;DR Summary

ResourceWhat it Does
IngressClassParamsConfigures ALB behavior (scheme, IP type, tags, etc.)
IngressClassRegisters a controller and links to params
IngressDefines routing rules to services; triggers ALB provisioning by the controller

5. Sample YAML Sequence

# 1. IngressClassParams
apiVersion: elbv2.k8s.aws/v1beta1
kind: IngressClassParams
metadata:
  name: alb
spec:
  scheme: internet-facing
  ipAddressType: ipv4

# 2. IngressClass
apiVersion: networking.k8s.io/v1
kind: IngressClass
metadata:
  name: alb
  annotations:
    ingressclass.kubernetes.io/is-default-class: "true"
spec:
  controller: eks.amazonaws.com/alb
  parameters:
    apiGroup: elbv2.k8s.aws
    kind: IngressClassParams
    name: alb

# 3. Ingress (example)
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: demo-ingress
spec:
  ingressClassName: alb
  rules:
    - host: demo.example.com
      http:
        paths:
          - path: /
            pathType: Prefix
            backend:
              service:
                name: demo-svc
                port:
                  number: 80

Hereโ€™s a detailed breakdown of the available options in IngressClassParams, the AWS Load Balancer Controller CRD, based on its schema:


Available Fields in spec for IngressClassParams

Derived from the CRD schema and documentation, here are the supported fields:

FieldTypeDescription
schemestringALB scheme: either internet-facing or internal.
ipAddressTypestringIP type: ipv4 or dualstack.
loadBalancerNamestringOptional. Allows specifying a custom name for the ALB to be created. (Go Packages)
groupobjectOptional. Defines load balancer group parametersโ€”may define group-based behavior. (GitHub, Go Packages)
Tagsmap[string][]stringOptional. Defines subnet tags to select subnets where LB should be created. (Go Packages)
Subnet selector (ids or tags)objectOptional. Allows specifying subnets either by ID or by tags. Only one option is allowed. (GitHub, Go Packages)

Notes & Summary

  • The core, commonly used fields are scheme and ipAddressType, which allow control over whether your ALB is public or internal and whether itโ€™s IPv4-only or dual-stack.
  • You also have optional fine-grained controls:
    • Naming with loadBalancerName
    • Subnet targeting via tags or explicit IDs
    • Grouping, if your use case involves grouping strategies.

Example YAML using all available fields:

apiVersion: elbv2.k8s.aws/v1beta1
kind: IngressClassParams
metadata:
  name: alb-custom
spec:
  scheme: internal
  ipAddressType: dualstack
  loadBalancerName: my-custom-alb
  tags:
    env:
      - prod
      - staging
  subnetSelector:
    tags:
      subnet-type: private
Code language: PHP (php)

Why It Matters

  • scheme & ipAddressType are essential for general behavior.
  • loadBalancerName helps when you need custom naming (like for tagging or monitoring).
  • tags and subnetSelector give you control over the network placement of ALB.
  • group can enable advanced configurations (multi-tenant or grouped routing).

hereโ€™s a comprehensive table of commonly used Kubernetes Ingress annotations, especially focusing on AWS Load Balancer Controller (since youโ€™re working with IngressClassParams and ALBs).


๐Ÿ”– Ingress Annotations & Their Purpose

AnnotationPurpose / Why Itโ€™s UsedExample Value
kubernetes.io/ingress.class(Legacy) Specifies which controller should manage the Ingress. Superseded by spec.ingressClassName.alb, nginx
alb.ingress.kubernetes.io/schemeDefines ALB scheme: public vs private.internet-facing, internal
alb.ingress.kubernetes.io/ip-address-typeSpecifies IP type for the ALB.ipv4, dualstack
alb.ingress.kubernetes.io/target-typeConfigures target type.instance, ip
alb.ingress.kubernetes.io/healthcheck-pathPath used for target health checks./healthz
alb.ingress.kubernetes.io/healthcheck-portPort for health checks.traffic-port, 80
alb.ingress.kubernetes.io/healthcheck-interval-secondsHealth check interval.30
alb.ingress.kubernetes.io/healthcheck-timeout-secondsTimeout for each health check request.5
alb.ingress.kubernetes.io/healthy-threshold-countNumber of successes before a target is marked healthy.2
alb.ingress.kubernetes.io/unhealthy-threshold-countNumber of failures before a target is marked unhealthy.2
alb.ingress.kubernetes.io/listen-portsDefines ALB listener ports.[{"HTTP":80},{"HTTPS":443}]
alb.ingress.kubernetes.io/certificate-arnACM certificate ARN for HTTPS.arn:aws:acm:region:account:certificate/...
alb.ingress.kubernetes.io/ssl-policySSL negotiation policy for HTTPS.ELBSecurityPolicy-2016-08
alb.ingress.kubernetes.io/backend-protocolProtocol from ALB โ†’ target.HTTP, HTTPS, GRPC
alb.ingress.kubernetes.io/actions.<action-name>Defines custom actions (redirects, fixed responses).{"Type":"redirect","RedirectConfig":{...}}
alb.ingress.kubernetes.io/load-balancer-attributesExtra LB attributes.idle_timeout.timeout_seconds=60
alb.ingress.kubernetes.io/waf-acl-arnAttach AWS WAF ACL to ALB.arn:aws:wafv2:...
alb.ingress.kubernetes.io/security-groupsAssign security groups to ALB.sg-12345,sg-67890
alb.ingress.kubernetes.io/subnetsPlace ALB in specific subnets.subnet-aaa,subnet-bbb
alb.ingress.kubernetes.io/target-group-attributesExtra target group attributes.deregistration_delay.timeout_seconds=30
alb.ingress.kubernetes.io/manage-backend-security-group-rulesControls whether controller manages SG rules for targets.true, false
alb.ingress.kubernetes.io/load-balancer-nameCustom ALB name (instead of auto-generated).my-app-alb
alb.ingress.kubernetes.io/inbound-cidrsRestrict inbound traffic to CIDRs.0.0.0.0/0,::/0
alb.ingress.kubernetes.io/conditions.<svc-name>Advanced routing based on headers, query params.[{ "field":"http-header", "httpHeaderConfig":{...} }]
alb.ingress.kubernetes.io/auth-typeEnable authentication at ALB.cognito, oidc
alb.ingress.kubernetes.io/auth-idp-cognitoDefine Cognito IdP config.JSON object
alb.ingress.kubernetes.io/auth-idp-oidcDefine OIDC IdP config.JSON object
alb.ingress.kubernetes.io/auth-scopeScopes for OIDC.openid,email
alb.ingress.kubernetes.io/auth-session-cookieCookie name for session stickiness.AWSELBAuthSessionCookie
alb.ingress.kubernetes.io/auth-session-timeoutAuth session timeout in seconds.3600

โšก Key Points

  1. Kubernetes-native:
    • kubernetes.io/ingress.class (legacy)
    • spec.ingressClassName (preferred since v1.18).
  2. AWS ALB-specific:
    • All annotations prefixed with alb.ingress.kubernetes.io/....
  3. Grouping:
    • Networking: scheme, ip-address-type, subnets, security-groups.
    • Routing: listen-ports, backend-protocol, conditions.*, actions.*.
    • Health checks: all healthcheck-*.
    • Security: waf-acl-arn, inbound-cidrs, auth-*.
    • Performance / Ops: load-balancer-attributes, target-group-attributes.

Find Trusted Cardiac Hospitals

Compare heart hospitals by city and services โ€” all in one place.

Explore Hospitals
I'm Rajesh Kumar, a DevOps, SRE, DevSecOps, Cloud, and Platform Engineering expert passionate about sharing practical knowledge, real-world experiences, and industry best practices. I have worked at Cotocus and regularly write about technology, travel, investing, health, product reviews, and digital marketing through my various platforms. I publish technical articles at DevOps School, travel stories at Holiday Landmark, stock market insights at Stocks Mantra, health and fitness guidance at My Medic Plus, product reviews at TrueReviewNow, and SEO and digital marketing strategies at Wizbrand.

Related Posts

Kubernetes Tutorials: IngressGroup on EKS (ALB Ingress): A Practical Guide to One-ALB-for-Many-Namespaces

What is an IngressGroup (and why it matters) IngressGroup lets you share a single ALB across multiple Ingress objects (even across different namespaces). The controller merges all…

Read More

Kubernetes: Setting up OIDC (Amazon Cognito) + ALB Ingress + gRPC (EKS)

Below is a complete, copy-pasteable, step-by-step guide to put OIDC (Amazon Cognito) + ALB Ingress + gRPC (EKS) behind your DNS with TLS. Iโ€™ve included all commands,…

Read More

Difference between AWS Load Balancer Controller Vs Kubernetes Gateway API Controller for AWS VPC Lattice

AWS Load Balancer Controller vs Kubernetes Gateway API Controller for AWS VPC Lattice Overview Table Feature AWS Load Balancer Controller Kubernetes Gateway API Controller for VPC Lattice…

Read More

AWS Load Balancer Controller for Kubernetes: A Comprehensive Guide

The AWS Load Balancer Controller is a Kubernetes controller that manages Elastic Load Balancers for Amazon EKS clusters. It provides a native way to expose Kubernetes services…

Read More

Kubernetes: Deploying AWS Load Balancer Controller with Terraform

Absolutely, deploying the AWS Load Balancer Controller (ALB Controller) in production via Terraform is now a very common, robust, and recommended practice. There are official Terraform modules…

Read More

GRPC: AWS ALB โ€œdowngrades HTTP/2 โ†’ HTTP/1.1

Excellent question. When we say AWS ALB โ€œdowngrades HTTP/2 โ†’ HTTP/1.1โ€, it means that although the client connects to ALB over HTTP/2, ALB then connects to your…

Read More
Subscribe
Notify of
guest
1 Comment
Newest
Oldest Most Voted
Skylar Bennett
Skylar Bennett
8 months ago

This was a very clear and helpful explanation of IngressClassParams, IngressClass, and Ingress in Kubernetes! I like how the article breaks down these concepts step by step โ€” itโ€™s much easier to understand how they work together. Thanks for sharing this informative guide!

1
0
Would love your thoughts, please comment.x
()
x