|
1 | 1 | # Installation
|
2 | 2 |
|
3 |
| -Users can get kpt in a variety of ways: |
| 3 | +Please follow the links below to install `kpt` components: |
4 | 4 |
|
5 |
| -?> If you are migrating from kpt `v0.39`, please follow the [migration guide] to |
6 |
| -kpt `v1.0+` binary. |
7 |
| - |
8 |
| -## Binaries |
9 |
| - |
10 |
| -Download pre-compiled binaries: |
11 |
| - |
12 |
| -- [Linux (x64)][linux] |
13 |
| -- [MacOS(x64)][darwin] |
14 |
| - |
15 |
| -On Linux and MacOS, make it executable: |
16 |
| - |
17 |
| -```shell |
18 |
| -$ chmod +x kpt |
19 |
| -``` |
20 |
| - |
21 |
| -?> On MacOS the first time, it may be necessary to open the |
22 |
| -program from the finder with _ctrl-click open_. |
23 |
| - |
24 |
| -Verify the version: |
25 |
| - |
26 |
| -```shell |
27 |
| -$ kpt version |
28 |
| -``` |
29 |
| - |
30 |
| -## (Optional) enable shell auto-completion |
31 |
| - |
32 |
| -kpt provides auto-completion support for several of the common shells. |
33 |
| -To see the options for enabling shell auto-completion: |
34 |
| -```shell |
35 |
| -$ kpt completion -h |
36 |
| -``` |
37 |
| - |
38 |
| -### Prerequisites |
39 |
| -Previous installations of kpt completion may have added the following line to |
40 |
| -the shell's config file (e.g. `.bashrc`, `.zshrc`, etc.): |
41 |
| -```shell |
42 |
| -complete -C <KPT_PATH> kpt |
43 |
| -``` |
44 |
| -This line needs to be removed for kpt's completion implementation to function |
45 |
| -properly. |
46 |
| - |
47 |
| -### Enable kpt auto-completion |
48 |
| -The kpt completion script for a shell can be generated with the commands |
49 |
| -`kpt completion bash`, `kpt completion zsh`, etc. |
50 |
| -For instructions on how to enable the script for the given shell, see the help |
51 |
| -page with the commands `kpt completion bash -h`, `kpt completion zsh -h`, etc. |
52 |
| - |
53 |
| -<!-- gcloud and homebrew are not yet available for builds from the main branch. |
54 |
| -## gcloud |
55 |
| -
|
56 |
| -Install with gcloud. |
57 |
| -
|
58 |
| -```shell |
59 |
| -$ gcloud components install kpt |
60 |
| -``` |
61 |
| -
|
62 |
| -```shell |
63 |
| -$ kpt version |
64 |
| -``` |
65 |
| -
|
66 |
| -The version of kpt installed using `gcloud` may not be the latest released version. |
67 |
| -
|
68 |
| -## Homebrew |
69 |
| -
|
70 |
| -Install the latest release with Homebrew on MacOS |
71 |
| -
|
72 |
| -```shell |
73 |
| -$ brew tap GoogleContainerTools/kpt https://github.com/GoogleContainerTools/kpt.git |
74 |
| -$ brew install kpt |
75 |
| -``` |
76 |
| -
|
77 |
| -```shell |
78 |
| -$ kpt version |
79 |
| -``` |
80 |
| ---> |
81 |
| - |
82 |
| -## Docker |
83 |
| - |
84 |
| -Use one of the kpt docker images. |
85 |
| - |
86 |
| -| Feature | `kpt` | `kpt-gcloud` | |
87 |
| -| --------- | :---: | :----------: | |
88 |
| -| kpt | ✓ | ✓ | |
89 |
| -| git | ✓ | ✓ | |
90 |
| -| diffutils | ✓ | ✓ | |
91 |
| -| gcloud | | ✓ | |
92 |
| - |
93 |
| -### `kpt` |
94 |
| - |
95 |
| -```shell |
96 |
| -$ docker run gcr.io/kpt-dev/kpt:v1.0.0-beta.13 version |
97 |
| -``` |
98 |
| - |
99 |
| -### `kpt-gcloud` |
100 |
| - |
101 |
| -An image which includes kpt based upon the Google [cloud-sdk] alpine image. |
102 |
| - |
103 |
| -```shell |
104 |
| -$ docker run gcr.io/kpt-dev/kpt-gcloud:v1.0.0-beta.13 version |
105 |
| -``` |
106 |
| - |
107 |
| -## Source |
108 |
| - |
109 |
| -Install by compiling the source. This requires having Go version 1.16+: |
110 |
| - |
111 |
| -```shell |
112 |
| -$ go install -v github.com/GoogleContainerTools/kpt@main |
113 |
| -``` |
114 |
| - |
115 |
| -kpt version will return `unknown` for binaries built from source: |
116 |
| - |
117 |
| -```shell |
118 |
| -$ kpt version |
119 |
| -``` |
120 |
| - |
121 |
| -[gcr.io/kpt-dev/kpt]: |
122 |
| - https://console.cloud.google.com/gcr/images/kpt-dev/GLOBAL/kpt?gcrImageListsize=30 |
123 |
| -[gcr.io/kpt-dev/kpt-gcloud]: |
124 |
| - https://console.cloud.google.com/gcr/images/kpt-dev/GLOBAL/kpt-gcloud?gcrImageListsize=30 |
125 |
| -[cloud-sdk]: https://github.com/GoogleCloudPlatform/cloud-sdk-docker |
126 |
| -[linux]: |
127 |
| - https://github.com/GoogleContainerTools/kpt/releases/download/v1.0.0-beta.13/kpt_linux_amd64 |
128 |
| -[darwin]: |
129 |
| - https://github.com/GoogleContainerTools/kpt/releases/download/v1.0.0-beta.13/kpt_darwin_amd64 |
130 |
| -[migration guide]: /installation/migration |
131 |
| -[bash-completion]: https://github.com/scop/bash-completion#installation |
| 5 | +- [kpt CLI](/installation/kpt-cli.md) |
| 6 | +- [Package Orchestrator](/guides/porch-installation.md) |
| 7 | +- [Config Sync](https://github.com/GoogleContainerTools/kpt-config-sync/blob/main/docs/installation.md) |
0 commit comments