4
4
5
5
Please visit the [ roadmap document] and the [ kpt milestones] .
6
6
7
- ### What does kpt provide that git clone doesn't?
8
-
9
- kpt enables out-of-the-box workflows that ` git clone ` does not. Such as: cloning
10
- and versioning git subdirectories, updating from upstream by performing
11
- structured merges on resources, programmatically editing configuration (rather
12
- than with an editor), etc.
13
-
14
7
### How is kpt different from other solutions?
15
8
16
- Rather than expressing configuration as code, kpt represents configuration
17
- packages as data, in particular as YAML or JSON objects adhering to [ The
18
- Kubernetes Resource Model] .
9
+ Rather than expressing configuration as code that generates configuration,
10
+ kpt represents [ Configuration as Data] , in particular as YAML or JSON objects
11
+ adhering to [ The Kubernetes Resource Model] , and uses a transformation-based
12
+ approach to customization. This enables interoperability of a variety of generators,
13
+ transformers, and validators. One doesn’t have to make all changes through a monolithic
14
+ generator implementation.
19
15
20
16
### What's the difference between kpt and kustomize?
21
17
22
- [ Kustomize] is a CNCF project that is a part of Kubernetes. While both kpt and
23
- kustomize support customization of KRM manifests without use of templates or
24
- DSL(s), there are important differences in both feature set and the scope of
25
- these projects. kpt supports end-to-end solutions for packaging, customization
26
- and actuation of resources. In kustomize, packaging is explicitly out of scope
27
- and actuation is deferred to kubectl.
18
+ While both kpt and kustomize support customization of KRM resources via a transformation-based approach,
19
+ there are important differences in both feature sets and the scopes of these projects.
28
20
29
- Here are the strengths and investment areas for these products:
21
+ _ kustomize_
22
+
23
+ - Builds the final configuration out of place, primarily using the [ overlay pattern] .
24
+ - Treats base layers as immutable, but enables nearly arbitrary overrides.
30
25
31
26
_ kpt_
32
27
33
- - Supports both in-place and out-of-place customization. kustomize is only
34
- focused on providing out-of-place hydration using the [ overlay pattern] .
35
- - Allows you to edit the configuration in-place without creating complex patches.
36
- - Focuses on rebase with resource merge strategy allowing for edited config to
28
+ - Optimizes for WYSIWYG configuration and in-place customization.
29
+ - Allows edits to the configuration in-place without creating complex patches.
30
+ - Supports rebase with resource merge strategy allowing for edited config to
37
31
be updated.
38
- - Has a continuous learning curve as you usually start small with modifying
39
- several YAML files using an editor and then want to scale with complexity of
40
- the application.
41
- - Enables workflows that combine programmatic changes (functions) with manual
32
+ - Enables workflows that combine programmatic changes ([ functions] ) with manual
42
33
edits.
43
-
44
- _ kustomize_
45
-
46
- - Treats base layers as immutable.
47
- - Programmatic changes (plugins) do not have to be idempotent.
48
- - Provide overlays and components that assemble that “build” the final
49
- configuration.
34
+ - Aims to support mutating and validating admission control on derived packages.
35
+ - Also supports packages, [ package orchestration] , resource actuation, and GitOps.
50
36
51
37
### Do kpt and kustomize work together?
52
38
53
39
The goal of kpt project is to provide a seamless UX spanning packaging,
54
- hydration , and live functionality. At the same time, kpt follows a modular
55
- design principle to make it possible to use each of its three command groups
56
- (pkg, fn, live) independently if needed. For example:
40
+ transformation , and actuation functionality. At the same time, kpt follows a modular
41
+ design principle to make it possible to use each of its functionality
42
+ independently if needed. For example:
57
43
58
44
- You can use packaging without declaring functions
59
- - You can use imperative functions to operate on vanilla directories of k8s
45
+ - You can use imperative functions to operate on vanilla directories of Kubernetes
60
46
resources
61
- - You can use apply logic without buying into full the packaging story (still
47
+ - You can use apply logic without buying into the full packaging story (still
62
48
need a minimal ` Kptfile ` though)
63
49
64
50
We have created a [ kustomize solution] which allows you to use kpt for packaging
@@ -69,8 +55,7 @@ and actuation, and kustomize for customization.
69
55
As explained in [ Declarative application management in Kubernetes] , using
70
56
resource configuration provides a number of desirable properties:
71
57
72
- 1 . it clearly ** represents the intended state** of the infrastructure -- no for
73
- loops, http calls, etc to interpret
58
+ 1 . it clearly ** represents the intended state** of the infrastructure
74
59
75
60
2 . it ** aligns with how tools developed by the Kubernetes project are written**
76
61
-- ` kubectl ` , ` kustomize ` , etc
@@ -89,15 +74,11 @@ resource configuration provides a number of desirable properties:
89
74
90
75
- develop CLIs and UIs for working with configuration rather than using ` vim `
91
76
92
- 6 . it ** supports customizing generated resources** so the templates don't need
93
- to be modified
94
-
95
- - artifacts generated from templates or DSLs may be modified directly, and
96
- then merged when they are regenerated to keep the modifications.
97
-
98
- 7 . it ** supports display in UI and tools** which use either OpenAPI or the
77
+ 6 . it ** supports display in UI and tools** which use either OpenAPI or the
99
78
YAML/JSON directly.
100
79
80
+ For a more complete explanation, see the [ rationale] .
81
+
101
82
### I really like DSL / templating solution X. Can I use it with kpt?
102
83
103
84
Yes. kpt supports plugging in solutions which generate or manipulate
@@ -121,11 +102,16 @@ don't have to alias it. It is pronounced "kept".
121
102
122
103
[ Please reach out!] [ contact ]
123
104
105
+ [ Configuration as Data] :
106
+ https://github.com/GoogleContainerTools/kpt/blob/main/docs/design-docs/06-config-as-data.md
107
+ [ package orchestration] :
108
+ https://github.com/GoogleContainerTools/kpt/blob/main/docs/design-docs/07-package-orchestration.md
124
109
[ the kubernetes resource model] :
125
110
https://github.com/kubernetes/community/blob/master/contributors/design-proposals/architecture/resource-management.md
126
111
[ declarative application management in kubernetes] :
127
112
https://github.com/kubernetes/community/blob/master/contributors/design-proposals/architecture/declarative-application-management.md
128
- [ functions ] : /reference/cli/fn/run/
113
+ [ rationale ] : https://kpt.dev/guides/rationale
114
+ [ functions ] : /reference/cli/fn/eval/
129
115
[ using functions ] : /book/04-using-functions/
130
116
[ contact ] : /contact/
131
117
[ functions catalog ] : https://catalog.kpt.dev/
@@ -135,6 +121,5 @@ don't have to alias it. It is pronounced "kept".
135
121
[ kustomize solution] :
136
122
https://github.com/GoogleContainerTools/kpt/tree/main/package-examples/kustomize
137
123
[ kustomize ] : https://kustomize.io
138
- [ workflow ] : /book/02-concepts/02-workflows
139
124
[ overlay pattern] :
140
125
https://github.com/kubernetes-sigs/kustomize/tree/master/examples/multibases
0 commit comments