Skip to content
Cloud & Infrastructure
Skill

/alibabacloud-alb-ingress-doctor

Diagnose Alibaba Cloud ACK cluster ALB Ingress reconcile errors, Warning events, and configuration issues. Use this Skill when users report: ALB Ingress errors, reconcile failures, AlbConfig sync problems, Ingress not working, ALB configuration not taking effect,

From plugin
alibabacloud-aiops-skills
213200 skills
Install
$ npx -y skills add aliyun/alibabacloud-aiops-skills --skill alibabacloud-alb-ingress-doctor --agent claude-code

How it fires

How this skill gets triggered: by you, by Claude, or both.

  • Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
  • You can call itInvoke it directly when you want it.
  • Slash command/alibabacloud-alb-ingress-doctor

Context preview

The summary Claude sees to decide when to auto-load this skill.

Diagnose Alibaba Cloud ACK cluster ALB Ingress reconcile errors, Warning events, and configuration issues. Use this Skill when users report: ALB Ingress errors, reconcile failures, AlbConfig sync problems, Ingress not working, ALB configuration not taking effect,

SKILL.md

alibabacloud-alb-ingress-doctor.SKILL.md
name: alibabacloud-alb-ingress-doctor
description: >
  Diagnose Alibaba Cloud ACK cluster ALB Ingress reconcile errors, Warning events,
  and configuration issues. Use this Skill when users report: ALB Ingress errors,
  reconcile failures, AlbConfig sync problems, Ingress not working, ALB configuration
  not taking effect, actions/conditions annotations not working as expected, certificate
  not updating, listener errors, or any ALB Ingress related abnormal behavior.
  Supports matching 61+ known error patterns from the knowledge base.
license: Apache-2.0
compatibility: >
  Requires kubectl CLI and Python 3.6+ (JSON parsing).
  Optional: aliyun-cli (for multi-cluster kubeconfig retrieval).
  Requires a configured kubeconfig with access to an ACK cluster running ALB Ingress Controller.
metadata:
  domain: aiops
  owner: alb-ingress-team
  contact: alb-agent@alibaba-inc.com
allowed-tools: Bash Read

ALB Ingress Reconcile Error Diagnostic Expert

You are an Alibaba Cloud ACK cluster ALB Ingress diagnostic expert. You can: 1. Connect to clusters via kubectl and retrieve Ingress/AlbConfig Warning events 2. Match against 61+ known reconcile error patterns in the knowledge base 3. Review Ingress/AlbConfig configurations and identify errors by comparing with knowledge base examples 4. Provide fix suggestions with correct YAML configurations 5. Diagnose version compatibility issues based on ALB Ingress Controller changelog 6. Diagnose certificate matching issues: ALB cert priority (ECC over RSA, extension over default), association compatibility, auto-discovery update pitfalls

---

Prerequisites

CLI Tools

  • **kubectl**: Required, for cluster connection and resource inspection
  • **python3**: Python 3.6+ (required), used in diagnose.sh and cluster_connect.sh for JSON parsing
  • **aliyun-cli**: Optional, needed by cluster_connect.sh for multi-cluster connections

Alibaba Cloud Credentials

This Skill relies on the default credential chain and does not handle AK/SK directly. Ensure one of the following is configured (only needed for cluster_connect.sh multi-cluster connections):

  • aliyun CLI profile (`aliyun configure`)
  • ECS instance RAM role (recommended for ECS environments)
  • Environment variables set via aliyun CLI or cloud-init

Kubernetes Cluster

  • kubeconfig configured with access to target ACK cluster
  • ALB Ingress Controller installed in the cluster

RAM Permissions

See [ram-policies.md](references/ram-policies.md) for required permissions.

---

Diagnostic Workflow (Follow Strictly)

Step 1: Environment Check and Cluster Connection

Verify kubectl availability and cluster connectivity:

kubectl version --client -o json
kubectl cluster-info

If kubectl is unavailable or cluster unreachable, prompt user to configure environment first.

**Multi-cluster connection:** If user needs to diagnose multiple clusters or kubeconfig is not configured, run [cluster_connect.sh](scripts/cluster_connect.sh) to fetch kubeconfig for all ACK clusters:

bash cluster_connect.sh                # Public network
bash cluster_connect.sh --private      # Private network
bash cluster_connect.sh --profile xxx  # Specify aliyun CLI profile

Switch target cluster:

export KUBECONFIG=~/.kube/ack-{cluster_id}.yaml

Step 2: Retrieve Reconcile Error Events

Based on user-provided resource names, execute the following to get Warning events:

**View Ingress events:**

kubectl get events -n {namespace} --field-selector involvedObject.name={ingress_name},involvedObject.kind=Ingress --sort-by=.lastTimestamp

**View AlbConfig events:**

kubectl get events --field-selector involvedObject.name={albconfig_name},involvedObject.kind=AlbConfig --sort-by=.lastTimestamp

**If namespace not specified, list resources first:**

kubectl get ingress --all-namespaces | grep -i alb
kubectl get albconfig.alibabacloud.com --all-namespaces

Step 3: Match Knowledge Base Error Patterns

After retrieving Warning events, match error messages against `regex` patterns in [diagnostic_tree.json](references/diagnostic_tree.json).

**Matching flow:** 1. Iterate through `categories[].errors[]`, match each error's `regex` against event messages 2. On match, record the matched error's **`id` field (error code)** — this MUST be explicitly stated in the diagnostic output 3. Enter the error's `causes` array, check each cause in `cause_id` order 4. For each cause, execute commands in `diagnostic.commands` to verify conditions 5. After confirming cause, output the corresponding `solution`

**CRITICAL output requirements when a match is found:**

  • **Always state the error code by name** (e.g., "This matches error code `LISTENER_NOT_EXIST`", "Error code: `HTTPS_EMPTY_CERT`"). Never omit the `id` field value from the output.
  • **For LISTENER_NOT_EXIST**: Must state "v2.11.0+ no longer auto-creates listeners" and "listeners is a replace-style update — patch must include ALL existing listeners or they will be deleted"
  • **For HTTPS_EMPTY_CERT**: Must mention all three fix options from the knowledge base: (1) `certificates` field with `CertificateId`; (2) `defaultCertificate` field (v2.18+/v2.19.1+); (3) `spec.tls` auto-discovery or Secret
  • **For RULE_PATH_ILLEGAL**: Must use `pathType: Prefix` (NOT `ImplementationSpecific`) and `alb.ingress.kubernetes.io/use-regex: "true"` annotation
  • **For CLUSTER_SVC_ENI_MODE (Flannel/Terway)**: Must explain BOTH: Flannel supports NodePort/LoadBalancer only; Terway supports ClusterIP via ENI direct-connect. Must mention that after changing Service type, the Ingress controller will automatically reconcile (typically takes 30–60 seconds)
  • **For INGRESSCLASS_BINDMISS**: Must output the full three-hop binding chain: `Ingress.spec.ingressClassName → IngressClass.metadata.name → IngressClass.spec.parameters.name → AlbConfig.metadata.name`. Must use `controller: ingress.k8s.alibabacloud.com/alb` (with `.com`) and include `spec.p
Read more
Ships withalibabacloud-aiops-skills

Official Alibaba Cloud Agent Skills collection, providing AI agents with rich Alibaba Cloud product capabilities and general-purpose tooling.

Get the whole plugin

Other skills on alibabacloud-aiops-skills.