https://github.com/kubernetes-sigs/kustomize

https://kubectl.docs.kubernetes.io/zh

Kustomize 允许用户以一个应用描述文件 (YAML 文件)为基础(Base YAML),然后通过 Overlay 的方式生成最终部署应用所需的描述文件。

在线安装

  1. curl -s "https://raw.githubusercontent.com/\
  2. kubernetes-sigs/kustomize/master/hack/install_kustomize.sh" | bash

二进制安装
https://github.com/kubernetes-sigs/kustomize/releases

[root@master ~]# tar xf kustomize_v4.5.2_linux_amd64.tar.gz 
[root@master ~]# mv kustomize /usr/local/bin/
[root@master ~]# kustomize version
{Version:kustomize/v4.5.2 GitCommit:9091919699baf1c5a5bf71b32ca73a993e98088b BuildDate:2022-02-09T23:26:42Z GoOs:linux GoArch:amd64}
[root@master ~]#

学习案例
https://github.com/kubernetes-sigs/kustomize/tree/master/examples/helloWorld

springboot

[root@master springboot]# tree 
.
|-- README.md
|-- base
|   |-- deployment.yaml
|   `-- service.yaml
`-- overlays
    |-- production
    |   |-- application.properties
    |   |-- healthcheck_patch.yaml
    |   |-- kustomization.yaml
    |   |-- memorylimit_patch.yaml
    |   `-- patch.yaml
    `-- staging
        |-- application.properties
        |-- kustomization.yaml
        `-- staging.env

4 directories, 11 files
[root@master springboot]#

使用 Kustomize 帮你管理 kubernetes 应用

什么是 Kustomize
Kustomize 的使用方法
将 Kustomize 应用于 CI/CD
简述核心配置 kustomization.yaml
配合 kubedog 完善 CI/CD 的最后一步

https://ghostwritten.blog.csdn.net/article/details/107925618