Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Consul Knowledge Patch?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/nevaberry-consul-knowledge-patch)
---
name: consul-knowledge-patch
description: HashiCorp Consul
version: "2.1.0"
license: MIT
metadata:
author: Nevaberry
---
# HashiCorp Consul Knowledge Patch
Load this skill for Consul upgrades, agent configuration, service discovery,
service mesh routing, gateways, identity, Kubernetes, and Enterprise operations.
The references contain detailed procedures, configuration examples, permission
requirements, and release-specific behavior. Enterprise-specific items retain
their product scope.
| Reference | Topics |
| --- | --- |
| [Upgrades and rollouts](references/upgrades-and-rollouts.md) | License migration, support, Envoy and build compatibility, FIPS, Autopilot, rolling upgrades, WAN ACL replication |
| [Discovery, networking, and mesh](references/discovery-networking-and-mesh.md) | IPv6, traffic redirection, registration, health, named ports, DNS, federation, mesh certificates, intentions |
| [Enterprise operations and telemetry](references/enterprise-operations-and-telemetry.md) | HTTP/gRPC/RPC limits, KV, caching, Raft, feature gates, utilization, telemetry, metrics, auditing, UI |
| [Gateways, security, and identity](references/gateways-security-and-identity.md) | ACLs, path normalization, gateway routing and TLS, OIDC/JWT, inference, workload OAuth, credential injection |
| [Kubernetes and snapshots](references/kubernetes-and-snapshots.md) | OpenShift migration, namespace security policies, gateway scaling, Google Cloud Storage, Azure Managed Identity |
## Upgrade and compatibility changes
### Enterprise license update order
When upgrading to Consul `1.21.7+ent` or later with the updated license, upgrade
servers first, then clients, and set both to `enterprise-standard`. Restart
servers one at a time while clients retain their existing license, then restart
clients to load the new license.
### Traffic redirection migration
`consul connect redirect-traffic`, Consul container images, and `sdk/nftables`
use `nft` with stateful NAT in `inet` chains for IPv4 and IPv6. This requires
Linux 5.2 or a kernel with the feature backported. Before running the command
during an in-place host or VM upgrade, remove old Consul-managed `iptables` and
`ip6tables` rules, update image scripts to use `nft`, and specify exclusions as
numeric UIDs and outbound IP addresses or CIDRs.
### FIPS artifact names and OpenShift resources
Enterprise FIPS metadata changes from `+ent.fips1402` to `+ent.fips1403`, and
artifact names use `F3` in place of `F2`. Update pipelines that pin these values.
FIPS 140-2 and 140-3 agents can coexist during a rolling upgrade.
For OpenShift 4.19 and later, migrate existing Consul API Gateway resources using
Kubernetes Gateway API `v1alpha` types to types in `consul.hashicorp.com`.
### Envoy extension and override permissions
Writing `service-defaults` with `builtin/lua`, `builtin/wasm`, or
`envoy_listener_json` / `envoy_cluster_json` in `UpstreamConfig` defaults or
overrides requires `mesh:write` in addition to `service:write`. Registering a
`connect-proxy` sidecar with the specified override keys in `Proxy.Config` or
`Proxy.Upstreams[*].Config` requires both permissions; matching is case-insensitive.
The gateway/security reference lists all keys. Enterprise checks also cover Go
field-name spellings such as `EnvoyListenerJSON` and Unicode case-folded spellings.
### Request limits and validation
Agent check update/register, service register, and Connect authorize endpoints
cap request bodies at 512 KiB before JSON decoding and return HTTP 413 for larger
bodies, including chunked requests and requests with `Content-Length`.
Enterprise agent HTTP and Resource APIs apply the 512 KiB default across requests,
including `/v1/config` writes and unsupported methods;
`limits.http_max_request_body_size` raises that cap.
KV key-name validation is enabled by default and can reject previously accepted
keys; `DisableKVKeyValidation` controls skipping it. KV also validates HTTP
`Content-Length` more strictly. Enterprise `PUT /v1/kv/` enforces
`kv_max_value_size` for chunked bodies. Event requests exceeding the
`Content-Length` limit fail.
External gRPC and gRPC-TLS listeners default to 100 concurrent TCP connections
per source IP; configure `limits.grpc_max_conns_per_client` to change the cap.
Their handshake timeout is 20 seconds. RPC headers default to a 512-byte limit
via `RPCMaxHeaderBytes`; excess closes the connection, and each header read uses
`RPCHandshakeTimeout` as its deadline. This RPC size limit applies only to headers.
### Identity and path enforcement
Enterprise `GET /v1/agent/connect/ca/leaf/:service` requires `service:write` on
the requested service for every request, including cache hits; otherwise HTTP
403 is returned. In Enterprise, updating an existing health check via
`Catalog.Register` requires write permission on the node or service that owns it.
API Gateway and terminating gateway HTTP listeners normalize paths before
Layer 7 intentions. Custom `envoy_public_listener_json` HTTP Connection Manager
filter chains also normalize inbound paths; `InsecureDisablePathNormalization`
disables that default.
Connect strips `x-forwarded-client-cert` from inbound HTTP requests before local
service forwarding. Connect sidecars add `X-Forwarded-Client-Cert` to inbound
gRPC requests they forward to the local service.
## Service discovery and mesh routing
### Address families and named ports
Use the optional service-definition `ports` field for multi-port catalog discovery;
Kubernetes Service sync also registers multi-port Services. Consul DNS selects a
specific service port with its `port` field. IPv4 and IPv6 are supported on VMs
and Kubernetes: use one family per datacenter, and IPv4 on OpenShift, Nomad, and ECS.
In Enterprise, sidecars advertise named ports with `proxy.local_service_ports`;
upstreams select one with `proxy.upstreams[].destination_port`. Direct-mode
applications dial `localhost:<bind-port>`; transparent mode can dial
`<port-name>.<service>.virtual.consul`, such as `grpc.payments.virtual.consul`.
When a multiport service has a `service-router`, `service-splitter`, or
`service-resolver`, the default or omitted port follows that discovery chain;
another named port connects directly to that port on the root service.
Enterprise peered multiport upstreams also accept `destination_port`.
### Proxy DNS, certificates, and intentions
Proxy DNS serves reachable explicit, intention-allowed transparent, and peered
upstreams' virtual IPs on UDP `127.0.0.1:8653`. With agent DNS recursors configured,
the proxy forwards queries to them via UDP `127.0.0.1:8654`.
Connect sidecars and terminating gateways receive downstream Connect leaf
certificates and CA roots over SDS; established connections stay open during leaf
rotation. Intention checks, service topology, and transparent proxy upstream
discovery honor `default_intention_policy` when it differs from `acl.default_policy`.
## Gateway routing and TLS
### Dynamic gates and upstream routing
Server `feature_gates { bootstrap = { ... } }` seeds the initial Raft policy.
`consul operator feature list`, `consul operator feature get`, and
`consul operator feature set` manage gates with compare-and-set updates.
Feature GET APIs support blocking queries and require `operator:read`; the PUT
API requires `operator:write`. Exact endpoints are in the operations reference.
After all servers in a datacenter upgrade, enable the experimental
`api-gateway-upstream-routing` gate to compose `HTTPRoute` matches with
`service-router` rules, preserve resolver subsets, and use the route's HTTP
protocol for discovery-chain watches. It defaults to disabled; changing its
effective value rebuilds existing agentless API Gateway proxy state.
### Listeners, discovery, and upstream controls
An `api-gateway` listener with `Protocol = "http2"` or `Protocol = "grpc"` uses
HTTP/2 from client through backend. Exposed services resolve as
`<service>.api-gateway.consul`; DNS registration for existing gateways is
automatically backfilled after all servers upgrade.
Gateway-wide `MaxConnections`, `MaxPendingRequests`, and `MaxConcurrentRequests`
defaults can be overridden by individual route services. `PassiveHealthCheck`
in gateway defaults or per-service limit overrides configures outlier detection.
On an `http-route` header match, `invert = true` matches an absent header or a
value that fails the configured match.
### Certificates and curves
An API Gateway listener's default SDS certificate can be overridden by HTTP or
TCP route service TLS settings. An override without an SDS cluster inherits the
listener's cluster; conflicting override mappings are rejected.
`TLS { Enabled = true }` on `api-gateway` uses its Connect leaf certificate for
downstream TLS with gateway service DNS SANs. Explicit certificates take
precedence for matching SNI names.
Use `ecdh_curves` in directional `mesh` TLS settings for sidecar mTLS, and
`tls_ecdh_curves` in agent TLS settings for RPC, HTTPS, and gRPC. A minimum TLS
version of `TLSv1_3` automatically adds `X25519MLKEM768`.
## Identity and Enterprise inference
OIDC enables PKCE by default and can use a JWT client assertion for UI sign-on.
OIDC and JWT auth methods accept mapped claims in `TokenNameFormat` for issued
ACL token names. OIDC logout uses discovery `end_session_endpoint` or
`OIDCLogoutURL`; the UI opens it, while `consul logout` prints it or opens it with
`-open-browser` or `CONSUL_LOGOUT_OPEN_BROWSER=true`.
Enterprise service definitions accept `ai` roles `inference-model`, `mcp-server`,
and `ai-agent` in agent files and HTTP registrations. Register and configure
`inference-gateway`, then launch its proxy and policy processor with
`consul connect envoy -gateway=inference`. `-ext-proc-socket-dir` overrides
`/var/run/consul`. Allow the gateway to reach mesh-accessible `inference-model`
services through intentions so it can select by capability and fail over by priority.
The gateway/security reference covers external model egress and its HTTP 503
conditions, Security Verify workload OAuth with `EnableServiceDCR = true`,
`private_key_jwt`, SDS credential delivery, on-behalf-of exchange, Vault credential
injection, and `builtin/ext-proc` Unix sockets.
## Operations, telemetry, and rollouts
Enterprise `rate-limit` config entries set cluster-wide RPC limits and exemptions
at runtime, replicated through Raft without server restarts.
`GET /v1/internal/rpc/methods` lists method names with an `operator:read` token.
`consul operator utilization -today-only` generates an Enterprise license report;
`-message` and `-y` are also accepted. Census collection is always enabled and
export is configurable. Self-managed Enterprise product telemetry is separately
opt-in and disabled by default; its export cadence survives restarts and leader
re-elections. Enterprise `GET /v1/operator/usage` is eventually consistent.
`/agent/metrics` exposes certificate expiration and renewal metrics with
datacenter, partition, and namespace labels. Configure monitoring and log
severity thresholds in `telemetry`; Connect CA APIs expose `NotAfter` for root
and intermediate certificates. The operations reference lists mesh routing,
adoption, auto-encrypt, and client-agent collection metrics.
Enterprise automated upgrades default to enabled. For a compatible version
upgrade, Autopilot keeps replacement servers as non-voters until they can form
a quorum, then promotes them and hands off leadership. Verify the replacement
leader and old servers' `Voter=false` before `consul leave` on each old server.
The rollout reference gives the full handoff and same-version replacement procedures.
For clients running sidecars or gateways, install an Envoy version compatible
with the target Consul release, stop the client agent before its proxies, and
start the upgraded client agent before its proxies.
In WAN federation, complete primary servers then clients before repeating in
each secondary; within each datacenter upgrade followers before the leader,
waiting for each server to rejoin with the new build.