antithesis-setup-k8s

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Antithesis K8s Setup

Antithesis K8s Setup

Skill version:
2026-08-19 d07de7b
Skill version:
2026-08-19 d07de7b

Purpose and Goal

目的与目标

Scaffold the
antithesis/
harness needed to bring the system up in Antithesis in a mostly idle, ready state.
Success means:
  • The deployment definition exists in
    antithesis/config/manifests/
    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
  • snouty validate
    on
    antithesis/config/
    succeeds
  • The harness is ready for the
    antithesis-workload
    skill to add or iterate on test templates, assertions, and workload code
  • If the user asks to submit or launch a run, use the
    antithesis-launch
    skill — do not run
    snouty launch
    directly
搭建
antithesis/
测试框架,使系统能够在Antithesis中以基本空闲、就绪的状态启动。
成功标准:
  • 部署定义存在于
    antithesis/config/manifests/
    中,并引用所需的SUT镜像。这是一组原生Kubernetes清单(不包含helm、kustomize)
  • antithesis/config/manifests/
    是Antithesis运行所需的基于K8s的被测系统(SUT)的最小化配置
  • antithesis/config/
    执行
    snouty validate
    命令成功
  • 测试框架已准备好使用
    antithesis-workload
    技能添加或迭代测试模板、断言和工作负载代码
  • 如果用户要求提交或启动运行任务,请使用
    antithesis-launch
    技能——不要直接运行
    snouty 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
      values.yaml
      , an ArgoCD Application with a values field, or a FluxCD HelmRelease with a values field.
    • 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.
  • 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 if
    snouty
    is not installed. See
    https://raw.githubusercontent.com/antithesishq/snouty/refs/heads/main/README.md
    for installation options.
  • This skill runs
    kubectl
    ,
    kind
    ,
    k3s
    ,
    kapp
    to 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.
  • This skill may have to run
    helm
    or
    kustomize
    commands to template out manifests.
  • 用户必须拥有一组Kubernetes制品,可以是helm图表、kustomize模板或Kubernetes清单。
    • 如果用户拥有helm图表,必须提供可用于模板化helm图表的values文件。文件形式可以是标准的
      values.yaml
      、包含values字段的ArgoCD Application,或包含values字段的FluxCD HelmRelease。
    • 如果用户拥有多组helm图表,需确定哪一部分(理想情况下是单个或少数几个组成独立应用)将作为Antithesis中的被测系统(SUT)。你可能需要询问用户的选择,不要自行推断目标SUT。
  • 用户必须已将镜像推送到Antithesis镜像仓库,或正在使用公共镜像。需要推送的镜像包括模板化helm图表运行所需的所有镜像。相关说明可查看
    references/manifests.md
  • 如果未安装
    snouty
    ,请勿继续操作。安装选项可查看
    https://raw.githubusercontent.com/antithesishq/snouty/refs/heads/main/README.md
  • 本技能会运行
    kubectl
    kind
    k3s
    kapp
    命令来操作活跃的Kubernetes集群,以验证清单能否在Kubernetes环境中正常启动。运行这些命令前请先询问用户。本技能仅应操作自身创建的Kubernetes资源,并在退出前清理所有创建的资源。
  • 本技能可能需要运行
    helm
    kustomize
    命令来生成模板化清单。

Documentation Grounding

文档参考

Use the
antithesis-documentation
skill to access these pages. Prefer
snouty 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-documentation
技能访问以下页面。优先使用
snouty 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)

流程(按顺序执行,但如果后续步骤与之前步骤矛盾,请重新执行之前的步骤)

  • references/directory-init.md
    : initialize the
    antithesis/
    directory. This will contain a collection of Kubernetes manifests that will run in Antithesis
  • references/manifests.md
    : constructs
    antithesis/config/manifests/
    as a collection of raw kubernetes manifests generated from the customers Kubernetes templates
  • references/horizontal-classification.md
    : attempts to figure out which parts of the system are necessary to test
  • references/vertical-classification.md
    : drops certain manifests that do not enhance the Antithesis Kubernetes experience
  • references/apply-findings.md
    : applies the findings from the classification steps to the manifests to simplify the setup
  • references/validate-snouty.md
    : runs
    snouty validate
    on the manifests and performs a static analysis
  • references/validate-local.md
    : deploys the Kubernetes manifests to a local k3s cluster to ensure SUT is functional
  • references/submit.md
    : test locally and submit the first run
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.md
.
Additionally, the
validate-local.md
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.
  • references/directory-init.md
    :初始化
    antithesis/
    目录。该目录将包含一组可在Antithesis中运行的Kubernetes清单
  • references/manifests.md
    :构建
    antithesis/config/manifests/
    目录,其中包含从用户Kubernetes模板生成的原生Kubernetes清单集合
  • references/horizontal-classification.md
    :尝试确定系统中哪些部分是测试必需的
  • references/vertical-classification.md
    :移除某些对Antithesis Kubernetes体验无增益的清单
  • references/apply-findings.md
    :将分类步骤的结果应用到清单中,简化配置
  • references/validate-snouty.md
    :对清单运行
    snouty validate
    命令并执行静态分析
  • references/validate-local.md
    :将Kubernetes清单部署到本地k3s集群,确保被测系统(SUT)功能正常
  • references/submit.md
    :本地测试并提交首次运行任务
这些流程阶段并非单向闸门。如果任何步骤发现之前的分类决策有误,请返回受影响的前期步骤重新执行,并更新
working.md
此外,用户可以跳过
validate-local.md
步骤。如果用户跳过某一步骤,请记录该步骤已跳过并继续执行技能。在所有步骤完成前,请勿提前退出并声称任务已完成。

Reference catalogs (from the steps above)

参考目录(来自上述步骤)

  • references/landmines.md
    : identifies classes of manifests that are detrimental to the Antithesis Kubernetes experience
  • references/operator-recipes.md
    : recipes for expanding operator managed custom resources into primitives - used during vertical-classification.
  • references/landmines.md
    :识别对Antithesis Kubernetes体验有害的清单类别
  • references/operator-recipes.md
    :将Operator管理的自定义资源扩展为基础资源的方案——用于垂直分类阶段

Reference

术语参考

SUT System under test.
snouty validate Use this command to quickly validate changes to the Antithesis scaffolding. See
snouty validate --help
for details.
working file Live, growing artifact across passes (
antithesis/scratchbook/k8s-minimization/working.md
)
landmine 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 --help
working file 在多次执行过程中持续更新的工件(
antithesis/scratchbook/k8s-minimization/working.md
landmine 一种通常会被最小化移除的平台层结构,有已知的处理方案(如Istio、cert-manager、external-secrets等)