Skip to content

Commit 9eddc3c

Browse files
authored
Update README.md
- Changes to address #5127
1 parent d3184da commit 9eddc3c

File tree

1 file changed

+75
-13
lines changed

1 file changed

+75
-13
lines changed

README.md

Lines changed: 75 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,16 @@ be updated on a regular basis going forward, and such updates
3636
will be reflected in the Kubernetes release notes.
3737

3838
| Kubectl version | Kustomize version |
39-
| --- | --- |
40-
| < v1.14 | n/a |
41-
| v1.14-v1.20 | v2.0.3 |
42-
| v1.21 | v4.0.5 |
43-
| v1.22 | v4.2.0 |
39+
| --------------- | ----------------- |
40+
| < v1.14 | n/a |
41+
| v1.14-v1.20 | v2.0.3 |
42+
| v1.21 | v4.0.5 |
43+
| v1.22 | v4.2.0 |
44+
| v1.23 | v4.4.1 |
45+
| v1.24 | v4.5.4 |
46+
| v1.25 | v4.5.7 |
47+
| v1.26 | v4.5.7 |
48+
| v1.27 | v5.0.1 |
4449

4550
[v2.0.3]: https://github.com/kubernetes-sigs/kustomize/releases/tag/v2.0.3
4651
[#2506]: https://github.com/kubernetes-sigs/kustomize/issues/2506
@@ -63,7 +68,37 @@ This file should declare those resources, and any
6368
customization to apply to them, e.g. _add a common
6469
label_.
6570

66-
![base image][imageBase]
71+
```
72+
73+
base: kustomization + resources
74+
75+
kustomization.yaml deployment.yaml service.yaml
76+
+-------------------------------+ +-------------------------------------------------------+ +-----------------------------------+
77+
| commonLabels: | | apiVersion: apps/v1 | | apiVersion: v1 |
78+
| app: myapp | | kind: Deployment | | kind: Service |
79+
| resources: | | metadata: | | metadata: |
80+
| - deployment.yaml | | name: myapp | | name: myapp |
81+
| - service.yaml | | spec: | | spec: |
82+
| configMapGenerator: | | selector: | | selector: |
83+
| - name: myapp-map | | matchLabels: | | app: myapp |
84+
| files: | | app: myapp | | ports: |
85+
| - env.startup.txt | | template: | | - port: <Port> |
86+
+-------------------------------+ | metadata: | | targetPort: <Target Port> |
87+
| labels: | +-----------------------------------+
88+
| app: myapp |
89+
| spec: |
90+
| containers: |
91+
| - name: myapp |
92+
| image: <Image> |
93+
| resources: |
94+
| limits: |
95+
| memory: "128Mi" |
96+
| cpu: "500m" |
97+
| ports: |
98+
| - containerPort: <Port> |
99+
+-------------------------------------------------------+
100+
101+
```
67102

68103
File structure:
69104

@@ -99,20 +134,47 @@ Manage traditional [variants] of a configuration - like
99134
_development_, _staging_ and _production_ - using
100135
[overlays] that modify a common [base].
101136
102-
![overlay image][imageOverlay]
137+
```
138+
139+
overlay: kustomization + patches + more resources
140+
141+
kustomization.yaml replica_count.yaml cpu_count.yaml
142+
+---------------------------------------+ +-------------------------------+ +------------------------------------------+
143+
| commonLabels: | | apiVersion: apps/v1 | | apiVersion: apps/v1 |
144+
| app: myapp | | kind: Deployment | | kind: Deployment |
145+
| resources: | | metadata: | | metadata: |
146+
| - ../../base | | name: myapp | | name: myapp |
147+
| patches: | | spec: | | spec: |
148+
| - path: replica_count.yaml | | selector: | | selector: |
149+
| - path: cpu_count.yaml | | matchLabels: | | matchLabels: |
150+
| | | app: myapp | | app: myapp |
151+
| | | template: | | template: |
152+
| | | metadata: | | metadata: |
153+
| | | labels: | | labels: |
154+
| | | app: myapp | | app: myapp |
155+
| | | spec: | | spec: |
156+
| | | replicas: 80 | | containers: |
157+
| | | | | - name: myapp |
158+
| | | | | resources: |
159+
| | | | | limits: |
160+
| | | | | memory: "128Mi" |
161+
| | | | | cpu: "7000m" |
162+
+---------------------------------------+ +-------------------------------+ +------------------------------------------+
163+
```
164+
103165
104166
File structure:
105167
> ```
106168
> ~/someApp
107169
> ├── base
108-
> │   ├── deployment.yaml
109-
> │   ├── kustomization.yaml
110-
> │   └── service.yaml
170+
> │ ├── deployment.yaml
171+
> │ ├── kustomization.yaml
172+
> │ └── service.yaml
111173
> └── overlays
112174
> ├── development
113-
> │   ├── cpu_count.yaml
114-
> │   ├── kustomization.yaml
115-
> │   └── replica_count.yaml
175+
> │ ├── cpu_count.yaml
176+
> │ ├── kustomization.yaml
177+
> │ └── replica_count.yaml
116178
> └── production
117179
> ├── cpu_count.yaml
118180
> ├── kustomization.yaml

0 commit comments

Comments
 (0)