Nginx To Higress Migration
higress-group/higress
Migrate from ingress-nginx to Higress in Kubernetes environments.
Step-by-step checklist for adding a new Policy CRD type to the NGINX Ingress Controller, from the Go types and validation to config generation and templates.
$ npx skills add nginx/kubernetes-ingress --skill nic-add-policy -a claude-codeProject install by default; add -g for ~/.claude/skills/.
$ gh skill install nginx/kubernetes-ingress nic-add-policy --agent claude-codeProject scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).
$ git clone --depth 1 https://github.com/nginx/kubernetes-ingress.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.github/skills/nic-add-policy .claude/skills/nic-add-policy && rm -rf skills-srcUse ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.
Claude Code skills documentation · loads skills from .claude/skills/
Install the "nic-add-policy" agent skill from https://github.com/nginx/kubernetes-ingress/tree/main/.github/skills/nic-add-policy into .claude/skills/nic-add-policy/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "nic-add-policy", then confirm the skill loads.Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$skill-installer install https://github.com/nginx/kubernetes-ingress/tree/main/.github/skills/nic-add-policyType this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
$ npx skills add nginx/kubernetes-ingress --skill nic-add-policy -a codexProject install goes to .agents/skills/; add -g for ~/.codex/skills/.
$ gh skill install nginx/kubernetes-ingress nic-add-policy --agent codexProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/nginx/kubernetes-ingress.git skills-src && mkdir -p .agents/skills && cp -r skills-src/.github/skills/nic-add-policy .agents/skills/nic-add-policy && rm -rf skills-srcUse ~/.agents/skills/ instead of .agents/skills for a personal install.
Codex skills documentation · loads skills from .agents/skills/
Install the "nic-add-policy" agent skill from https://github.com/nginx/kubernetes-ingress/tree/main/.github/skills/nic-add-policy into .agents/skills/nic-add-policy/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "nic-add-policy", then confirm the skill loads.Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add nginx/kubernetes-ingress --skill nic-add-policy -a cursorProject install goes to .agents/skills/; add -g for ~/.cursor/skills/.
$ gh skill install nginx/kubernetes-ingress nic-add-policy --agent cursorProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/nginx/kubernetes-ingress.git skills-src && mkdir -p .cursor/skills && cp -r skills-src/.github/skills/nic-add-policy .cursor/skills/nic-add-policy && rm -rf skills-srcUse ~/.cursor/skills/ instead of .cursor/skills for a personal install.
Cursor skills documentation · loads skills from .cursor/skills/, .agents/skills/, .claude/skills/, .codex/skills/
Install the "nic-add-policy" agent skill from https://github.com/nginx/kubernetes-ingress/tree/main/.github/skills/nic-add-policy into .cursor/skills/nic-add-policy/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "nic-add-policy", then confirm the skill loads.Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gemini skills install https://github.com/nginx/kubernetes-ingress.git --path .github/skills/nic-add-policy--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
$ npx skills add nginx/kubernetes-ingress --skill nic-add-policy -a gemini-cliProject install goes to .agents/skills/; add -g for ~/.gemini/skills/.
$ gh skill install nginx/kubernetes-ingress nic-add-policy --agent gemini-cliProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/nginx/kubernetes-ingress.git skills-src && mkdir -p .gemini/skills && cp -r skills-src/.github/skills/nic-add-policy .gemini/skills/nic-add-policy && rm -rf skills-srcUse ~/.gemini/skills/ instead of .gemini/skills for a personal install, then run /skills reload.
Gemini CLI skills documentation · loads skills from .gemini/skills/, .agents/skills/
Install the "nic-add-policy" agent skill from https://github.com/nginx/kubernetes-ingress/tree/main/.github/skills/nic-add-policy into .gemini/skills/nic-add-policy/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "nic-add-policy", then confirm the skill loads.Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ gh skill install nginx/kubernetes-ingress nic-add-policyInstalls for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
$ npx skills add nginx/kubernetes-ingress --skill nic-add-policy -a github-copilotProject install goes to .agents/skills/; add -g for ~/.copilot/skills/.
$ git clone --depth 1 https://github.com/nginx/kubernetes-ingress.git skills-src && mkdir -p .github/skills && cp -r skills-src/.github/skills/nic-add-policy .github/skills/nic-add-policy && rm -rf skills-srcUse ~/.copilot/skills/ instead of .github/skills for a personal install. Commit .github/skills so cloud agent and code review can use it.
GitHub Copilot skills documentation · loads skills from .github/skills/, .claude/skills/, .agents/skills/
Install the "nic-add-policy" agent skill from https://github.com/nginx/kubernetes-ingress/tree/main/.github/skills/nic-add-policy into .github/skills/nic-add-policy/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "nic-add-policy", then confirm the skill loads.GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
$ npx skills add nginx/kubernetes-ingress --skill nic-add-policy -a opencodeOpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
$ gh skill install nginx/kubernetes-ingress nic-add-policy --agent opencodeProject scope by default (.agents/skills/); add --scope user for a personal install.
$ git clone --depth 1 https://github.com/nginx/kubernetes-ingress.git skills-src && mkdir -p .opencode/skills && cp -r skills-src/.github/skills/nic-add-policy .opencode/skills/nic-add-policy && rm -rf skills-srcUse ~/.config/opencode/skills/ instead of .opencode/skills for a personal install.
OpenCode skills documentation · loads skills from .opencode/skills/, .claude/skills/, .agents/skills/
Install the "nic-add-policy" agent skill from https://github.com/nginx/kubernetes-ingress/tree/main/.github/skills/nic-add-policy into .opencode/skills/nic-add-policy/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "nic-add-policy", then confirm the skill loads.OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
nic-add-policyStep-by-step checklist for adding a new Policy CRD type to the NGINX Ingress Controller, from the Go types and validation to config generation and templates.
The steps must be followed in order. The first defines the CRD struct in `pkg/apis/configuration/v1/types.go` with kubebuilder markers, adds a pointer field to `PolicySpec`, and observes the naming and pointer conventions for JSON tags and optional fields. Next come `make update-codegen` for deep-copy code and `make update-crds` for the CRD manifests and chart CRDs.
Then validation is added in `pkg/apis/configuration/validation/policy.go` with tests, template structs go into `internal/configs/version2/http.go`, and config generation is added in `internal/configs/policy.go`. The policy is wired into VirtualServer generation and, where applicable, Ingress generation including mergeable Ingress, and finally NGINX template directives are added for both the version 2 and version 1 templates, for NGINX and NGINX Plus. Example policy types include rate limit, JWT, OIDC, WAF, CORS and cache.
12 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit 03e1429. It shows what the files ask for, not the result of running them.
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Shell commands in SKILL.md call:
makegitFrom the folder's file list and the shell code blocks in SKILL.md.
No URLs in SKILL.md. Its commands use git, which can reach the network depending on how they are called.
From URLs in SKILL.md, links to its own repository left out.
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
NGINX Ingress Policy CRD Guide loads about 2k tokens when it runs. Until then it costs about 73 tokens; SKILL.md has 712 words of instructions outside code blocks.
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
The automated check found no risky patterns in SKILL.md.
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
The full file from nginx/kubernetes-ingress at commit 03e1429, republished under its Apache-2.0 licence (© nginx). 712 words, ~1,963 tokens.
.claude/skills/nic-add-policy/SKILL.md (or your agent's skills folder).Follow these steps IN ORDER. Each step depends on the previous.
File: pkg/apis/configuration/v1/types.go
type MyPolicy struct { ... })*MyPolicy pointer field to PolicySpec*bool/*int = optional/nullable. Plain bool/int = required or zero-defaultfalse must be non-pointer value typesRun make update-codegen to update zz_generated.deepcopy.go.
Run make update-crds to regenerate config/crd/bases/, deploy/crds.yaml, and chart CRDs.
File: pkg/apis/configuration/validation/policy.go
validate<MyPolicy>(spec *v1.MyPolicy, fieldPath *field.Path) field.ErrorListvalidatePolicySpec() with field count increment and feature gate checkpolicy_test.go with valid and invalid casesFile: internal/configs/version2/http.go
type MyPolicyConfig struct { ... })*MyPolicyConfig or fields to Server, Location, or bothVirtualServerConfigFile: internal/configs/policy.go
policiesCfgadd<MyPolicy>Config() method following the pattern belowswitch in generatePolicies()policy_test.goFile: internal/configs/virtualserver.go
GenerateVirtualServerConfig(), extract from policiesCfg and assign to version2 fieldsaddPoliciesCfgToLocation() for location-level assignmentFile: internal/configs/ingress.go
generateNginxCfg(), extract from policiesCfg and assign to version1 fieldsgenerateNginxCfgForMergeableIngresses()internal/configs/version2/nginx.virtualserver.tmpl and internal/configs/version2/nginx-plus.virtualserver.tmplinternal/configs/version1/nginx.ingress.tmpl and internal/configs/version1/nginx-plus.ingress.tmpl{{- if }} / {{- with }} guards around directive blocksinternal/configs/version2/template_helper.go and/or internal/configs/version1/template_helper.go, matching the template version you are updatingserver{}server{}, location-level inside each location{}Files: internal/configs/version2/templates_test.go (VS/VSR/TS), internal/configs/version1/template_test.go (Ingress)
make test-update-snaps.git diff -- '**/__snapshots__/**' and confirm your directives render in the golden files for every edition the policy supports. Plus-only policies (OIDC, WAF) must appear in the Plus golden files only; policies available to both editions must appear in both.make test to confirm green, and commit the regenerated golden files with the template change.If you wired the policy into Ingress (Step 8), version1 snapshots must change too.
charts/nginx-ingress/values.yaml -- add value with ## doccharts/nginx-ingress/values.schema.json -- add schema entrycharts/nginx-ingress/templates/_helpers.tpl -- add CLI arg or ConfigMap keycharts/tests/testdata/ -- add test values filecharts/tests/helmunit_test.go -- add test caseFile: internal/k8s/
syncPolicy(), ensure the new type is handled for VS/VSR/IngressIf the policy references secrets:
policySecretIndexFunc() through collectPolicySecretRefs() or collectWAFSecretRefs().secretStore.GetSecret(namespacedKey, role).secrets.RefKey(namespacedKey, role).Secret.type or Secret data.syncPolicy() fans out to every supported VS, VSR, and Ingress consumer.Directory: tests/suite/
tests/data/<feature>/test_<feature>_policies_vs.py, _vsr.py, _ingress.py@pytest.mark.policies and @pytest.mark.policies_<feature> markerspyproject.toml -- pytest runs with --strict-markersmake update-codegen after changing types.go -- the build will fail with missing DeepCopy methodscontainsDangerousChars() validationmake update-crds also refreshes deploy/crds*.yaml and docs/crd/; charts/nginx-ingress/crds is a symlink to config/crd/bases/make telemetry-schema -- CI fails on any diff in internal/telemetrypoliciesCfg duplicate check must warn and return, not error (exception: addCORSConfig has no duplicate check -- it overwrites, since CORS is additive via headers)Every add*Config() method in internal/configs/policy.go follows this pattern:
func (p *policiesCfg) addMyPolicyConfig(spec *conf_v1.MyPolicy, key, namespace string,
secretRefs map[secrets.SecretRefKey]*secrets.SecretReference) *validationResults {
res := newValidationResults()
// 1. Duplicate check
if p.MyPolicy != nil {
res.addWarningf("MyPolicy policy already configured, ignoring")
return res
}
// 2. Secret resolution (if applicable)
secretKey := namespace + "/" + spec.Secret
refKey := secrets.RefKey(secretKey, secrets.RoleExpected)
secretRef, ok := secretRefs[refKey]
if !ok || secretRef == nil {
res.isError = true
res.addWarningf("secret %s could not be resolved", secretKey)
return res
}
if secretRef.Error != nil {
res.isError = true
res.addWarningf("secret %s is invalid: %v", secretKey, secretRef.Error)
return res
}
// 3. Build template struct and assign
p.MyPolicy = &version2.MyPolicyConfig{
Field1: spec.Field1,
Field2: spec.Field2,
Secret: secretRef.Path,
}
return res
}{{- with $s.MyPolicy }}
my_directive {{ .Value }};
{{- if .OptionalField }}
my_optional_directive {{ .OptionalField }};
{{- end }}
{{- end }}© nginx, Apache-2.0. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file
Just SKILL.md in .github/skills/nic-add-policy of nginx/kubernetes-ingress.
Open the folder on GitHubat commit 03e1429
NGINX Ingress Policy CRD Guide next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
| Skill | Stars | Used in | Tokens | Auto-check | Licence | Repo updated |
|---|---|---|---|---|---|---|
| NGINX Ingress Policy CRD Guide this skillnginx/kubernetes-ingress | 5.1k | — | ~2k | Automated safety check: Pass | Apache-2.0 | |
| Nginx To Higress Migrationhigress-group/higress | 9.5k | — | ~3.9k | Automated safety check: Pass | Apache-2.0 | |
| KubeSphere Gateway Managementkubesphere/kubesphere | 17k | — | ~2.9k | Automated safety check: Pass | Custom licence | |
| Kubeshark KFL2 Filter Referencekubeshark/kubeshark | 12k | — | ~3.6k | Automated safety check: Pass | Apache-2.0 | |
| Tgf Server Devthkhxm/tgf | 128 | — | ~1.3k | Automated safety check: Notes | MIT | |
| Intrinsic Core Debuggingintrinsic-ai/intrinsic-core | 557 | — | ~3.8k | Automated safety check: Notes | Apache-2.0 |
higress-group/higress
Migrate from ingress-nginx to Higress in Kubernetes environments.
kubesphere/kubesphere
Installs, uninstalls, checks and troubleshoots the KubeSphere Gateway extension built on ingress-nginx, including gateways stuck in bad states and Helm or pod failures.
kubeshark/kubeshark
Syntax reference for KFL2, the CEL-based display filter language used to search Kubernetes network traffic captured by Kubeshark, loaded before any filter is written.
thkhxm/tgf
基于 tgf v2(github.com/thkhxm/tgf/v2)用确定性的 tgfctl 工作流创建、验证和维护 Go 游戏服务器项目。
intrinsic-ai/intrinsic-core
Meta-level debugging workflows, architectural layer isolation, and progressive disclosure routing across Envoy ingress, Kubernetes pods, Behavior Trees, ObjectWorld synchronization, ICON real-time…
timothywarner/chatgptclass
Deploy and operate workloads on Azure Kubernetes Service (AKS) the safe way.
nginx/kubernetes-ingress
Gives step-by-step checklists for adding Ingress annotations, VirtualServer fields and Helm values to the NGINX Kubernetes Ingress Controller, with common gotchas.
nginx/kubernetes-ingress
Explains the multi-stage Dockerfile, the 25 image variant combinations, and the Makefile targets for building NGINX Ingress Controller images.
nginx/kubernetes-ingress
Maps the NGINX Kubernetes Ingress Controller codebase: repository layout, architectural layers, layer-crossing rules and which files are generated.
nginx/kubernetes-ingress
Testing conventions for the NGINX Ingress Controller repo: Go table-driven tests, mandatory snapshot regeneration, Helm tests and Python pytest integration tests.
nginx/kubernetes-ingress
Explains how the NGINX Ingress Controller's GitHub Actions workflows, reusable workflows, build matrices and release pipeline fit together across two repositories.
nginx/kubernetes-ingress
Troubleshooting patterns for the NGINX Ingress Controller: reload failures, custom resources that have no effect, controller panics and snapshot test failures.
Works with
Categories
Step-by-step checklist for adding a new Policy CRD type to the NGINX Ingress Controller, from the Go types and validation to config generation and templates. The steps must be followed in order.go` with kubebuilder markers, adds a pointer field to `PolicySpec`, and observes the naming and pointer conventions for JSON tags and optional fields.
NGINX Ingress Policy CRD Guide fits situations like: implementing a new policy type such as RateLimit, JWTAuth or CORS; extending the policy system with a new CRD field; checking that a new policy is wired into both VirtualServer and Ingress generation.
Run `npx skills add nginx/kubernetes-ingress --skill nic-add-policy -a claude-code`. Or copy the skill folder (.github/skills/nic-add-policy in nginx/kubernetes-ingress) into .claude/skills/nic-add-policy in your project. Claude Code loads it when a task matches its description.
Run `npx skills add nginx/kubernetes-ingress --skill nic-add-policy -a codex`. Or copy the skill folder (.github/skills/nic-add-policy in nginx/kubernetes-ingress) into .agents/skills/nic-add-policy in your project. Codex loads it when a task matches its description.
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add nginx/kubernetes-ingress --skill nic-add-policy -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/nic-add-policy, .gemini/skills/nic-add-policy, .github/skills/nic-add-policy and .opencode/skills/nic-add-policy in your project.
Going by SKILL.md and its folder, NGINX Ingress Policy CRD Guide needs the command-line tools its instructions call (make and git). Our summary lists: A checkout of the NGINX Kubernetes Ingress repository; Go and make, for the codegen and CRD targets.
SKILL.md contains no URLs. Its commands use git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.
Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.
NGINX Ingress Policy CRD Guide is published under the Apache-2.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
About 2k tokens (SKILL.md is roughly 7.9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
Skills that share tags, products or a category with NGINX Ingress Policy CRD Guide: Nginx To Higress Migration (higress-group/higress, 9.5k stars), KubeSphere Gateway Management (kubesphere/kubesphere, 17k stars), Kubeshark KFL2 Filter Reference (kubeshark/kubeshark, 12k stars) and Tgf Server Dev (thkhxm/tgf, 128 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
nginx (a GitHub organization) maintains it in nginx/kubernetes-ingress, which has 5,081 GitHub stars. The repository holds 9 skills in this directory. The repository was last updated on October 9, 2026.
Source: nginx/kubernetes-ingress on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.