antithesis-setup-k8s
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseAntithesis K8s Setup
Antithesis K8s Setup
Skill version:
2026-08-19 d07de7bSkill version:
2026-08-19 d07de7bPurpose and Goal
目的与目标
Scaffold the harness needed to bring the system up in Antithesis in a mostly idle, ready state.
antithesis/Success means:
- The deployment definition exists in and references the required SUT images. This is a collection of raw Kubernetes manifests (no helm, no kustomize)
antithesis/config/manifests/ - is a minimized setup of the k8s-based SUT that is required for the Antithesis run
antithesis/config/manifests/ - on
snouty validatesucceedsantithesis/config/ - The harness is ready for the skill to add or iterate on test templates, assertions, and workload code
antithesis-workload - If the user asks to submit or launch a run, use the skill — do not run
antithesis-launchdirectlysnouty launch
搭建测试框架,使系统能够在Antithesis中以基本空闲、就绪的状态启动。
antithesis/成功标准:
- 部署定义存在于中,并引用所需的SUT镜像。这是一组原生Kubernetes清单(不包含helm、kustomize)
antithesis/config/manifests/ - 是Antithesis运行所需的基于K8s的被测系统(SUT)的最小化配置
antithesis/config/manifests/ - 对执行
antithesis/config/命令成功snouty validate - 测试框架已准备好使用技能添加或迭代测试模板、断言和工作负载代码
antithesis-workload - 如果用户要求提交或启动运行任务,请使用技能——不要直接运行
antithesis-launchsnouty launch
Prerequisites
前置条件
-
The user must have a collection of Kubernetes artifacts. This can be a helm chart, kustomize templates, or Kubernetes manifests.
- If the user has a helm chart, they must provide a values file that can be templated into the helm chart. This can be in the form of a standard , an ArgoCD Application with a values field, or a FluxCD HelmRelease with a values field.
values.yaml - If the user has a collection of helm charts, determine what subset (ideally a single one or a couple to make one standalone application) of helm charts will be the system under test in Antithesis. You may have to ask the user which one they want. Do not infer what the single target SUT is.
- If the user has a helm chart, they must provide a values file that can be templated into the helm chart. This can be in the form of a standard
-
The user must have already pushed up images to the antithesis registry or is using public images. The images that should be pushed up are all the images that are required to run the templatized helm chart. There are instructions for this in
references/manifests.md -
DO NOT PROCEED ifis not installed. See
snoutyfor installation options.https://raw.githubusercontent.com/antithesishq/snouty/refs/heads/main/README.md -
This skill runs,
kubectl,kind,k3sto touch an active Kubernetes cluster to validate that the manifests are able to come up in a Kubernetes environment. Ask the user before running any of these commands. The skill should only touch Kubernetes resources that it has created and should clean up all resources it creates before exiting.kapp -
This skill may have to runor
helmcommands to template out manifests.kustomize
-
用户必须拥有一组Kubernetes制品,可以是helm图表、kustomize模板或Kubernetes清单。
- 如果用户拥有helm图表,必须提供可用于模板化helm图表的values文件。文件形式可以是标准的、包含values字段的ArgoCD Application,或包含values字段的FluxCD HelmRelease。
values.yaml - 如果用户拥有多组helm图表,需确定哪一部分(理想情况下是单个或少数几个组成独立应用)将作为Antithesis中的被测系统(SUT)。你可能需要询问用户的选择,不要自行推断目标SUT。
- 如果用户拥有helm图表,必须提供可用于模板化helm图表的values文件。文件形式可以是标准的
-
用户必须已将镜像推送到Antithesis镜像仓库,或正在使用公共镜像。需要推送的镜像包括模板化helm图表运行所需的所有镜像。相关说明可查看
references/manifests.md -
如果未安装,请勿继续操作。安装选项可查看
snoutyhttps://raw.githubusercontent.com/antithesishq/snouty/refs/heads/main/README.md -
本技能会运行、
kubectl、kind、k3s命令来操作活跃的Kubernetes集群,以验证清单能否在Kubernetes环境中正常启动。运行这些命令前请先询问用户。本技能仅应操作自身创建的Kubernetes资源,并在退出前清理所有创建的资源。kapp -
本技能可能需要运行或
helm命令来生成模板化清单。kustomize
Documentation Grounding
文档参考
Use the skill to access these pages. Prefer .
antithesis-documentationsnouty docs- Kubernetes setup guide:
https://antithesis.com/docs/getting_started/setup_guide/setup_k8s.md - Kubernetes best practices:
https://antithesis.com/docs/best_practices/k8s_best_practices.md - Handling external dependencies:
https://antithesis.com/docs/reference/dependencies.md - Fault injection:
https://antithesis.com/docs/product/fault_injection.md
使用技能访问以下页面。优先使用命令。
antithesis-documentationsnouty docs- Kubernetes设置指南:
https://antithesis.com/docs/getting_started/setup_guide/setup_k8s.md - Kubernetes最佳实践:
https://antithesis.com/docs/best_practices/k8s_best_practices.md - 外部依赖处理:
https://antithesis.com/docs/reference/dependencies.md - 故障注入:
https://antithesis.com/docs/product/fault_injection.md
Workflow
工作流程
This skill is broken out into multiple steps, each in a different reference file. Read and implement each reference file listed below one at a time to fully set up a project. After implementing each step, check whether what you learned invalidates any decisions from earlier steps - if it does, return to that step and redo it before proceeding. The horizontal-classification and vertical-classifications require a working file that will be applied to the manifests during the apply-findings stage. Keep these findings in case analysis is required of what changed when using the setup in Antithesis.
At the beginning of running the skill, ask the user if they would like to start from scratch or continue from a past iteration.
本技能分为多个步骤,每个步骤对应不同的参考文件。请依次阅读并实现以下列出的每个参考文件,以完成项目的完整设置。完成每个步骤后,检查所获得的信息是否会推翻之前步骤的决策——如果是,请返回该步骤重新执行,再继续后续流程。水平分类和垂直分类需要一个工作文件,该文件将在应用结果阶段应用到清单中。请保留这些结果,以便在分析Antithesis设置中的变更时使用。
在运行本技能之初,请询问用户是希望从头开始还是从之前的迭代继续。
Pipeline (run in order, but reopen an earlier pass when a later one contradicts it)
流程(按顺序执行,但如果后续步骤与之前步骤矛盾,请重新执行之前的步骤)
- : initialize the
references/directory-init.mddirectory. This will contain a collection of Kubernetes manifests that will run in Antithesisantithesis/ - : constructs
references/manifests.mdas a collection of raw kubernetes manifests generated from the customers Kubernetes templatesantithesis/config/manifests/ - : attempts to figure out which parts of the system are necessary to test
references/horizontal-classification.md - : drops certain manifests that do not enhance the Antithesis Kubernetes experience
references/vertical-classification.md - : applies the findings from the classification steps to the manifests to simplify the setup
references/apply-findings.md - : runs
references/validate-snouty.mdon the manifests and performs a static analysissnouty validate - : deploys the Kubernetes manifests to a local k3s cluster to ensure SUT is functional
references/validate-local.md - : test locally and submit the first run
references/submit.md
These stages of the pipeline are NOT one-way gates. If any parts reveal a classification decision earlier was wrong, go back and re-run the affected earlier pass and update .
working.mdAdditionally, the step may be skipped by the user. If the user skips a step, make sure to record that the step is skipped and continue with the skill. Do not exit early and say that the task is complete until all parts have been completed.
validate-local.md- :初始化
references/directory-init.md目录。该目录将包含一组可在Antithesis中运行的Kubernetes清单antithesis/ - :构建
references/manifests.md目录,其中包含从用户Kubernetes模板生成的原生Kubernetes清单集合antithesis/config/manifests/ - :尝试确定系统中哪些部分是测试必需的
references/horizontal-classification.md - :移除某些对Antithesis Kubernetes体验无增益的清单
references/vertical-classification.md - :将分类步骤的结果应用到清单中,简化配置
references/apply-findings.md - :对清单运行
references/validate-snouty.md命令并执行静态分析snouty validate - :将Kubernetes清单部署到本地k3s集群,确保被测系统(SUT)功能正常
references/validate-local.md - :本地测试并提交首次运行任务
references/submit.md
这些流程阶段并非单向闸门。如果任何步骤发现之前的分类决策有误,请返回受影响的前期步骤重新执行,并更新。
working.md此外,用户可以跳过步骤。如果用户跳过某一步骤,请记录该步骤已跳过并继续执行技能。在所有步骤完成前,请勿提前退出并声称任务已完成。
validate-local.mdReference catalogs (from the steps above)
参考目录(来自上述步骤)
- : identifies classes of manifests that are detrimental to the Antithesis Kubernetes experience
references/landmines.md - : recipes for expanding operator managed custom resources into primitives - used during vertical-classification.
references/operator-recipes.md
- :识别对Antithesis Kubernetes体验有害的清单类别
references/landmines.md - :将Operator管理的自定义资源扩展为基础资源的方案——用于垂直分类阶段
references/operator-recipes.md
Reference
术语参考
SUT
System under test.
snouty validate
Use this command to quickly validate changes to the Antithesis scaffolding. See for details.
snouty validate --helpworking file
Live, growing artifact across passes ()
antithesis/scratchbook/k8s-minimization/working.mdlandmine
A platform-layer construct that is commonly minimized away, with a known recipe (Istio, cert-manager, external-secrets, etc.)
SUT
被测系统。
snouty validate
使用此命令快速验证Antithesis脚手架的变更。详情请查看。
snouty validate --helpworking file
在多次执行过程中持续更新的工件()
antithesis/scratchbook/k8s-minimization/working.mdlandmine
一种通常会被最小化移除的平台层结构,有已知的处理方案(如Istio、cert-manager、external-secrets等)