-
Notifications
You must be signed in to change notification settings - Fork 569
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1132 from 24sama/v2.0.0
add kk command doc
- Loading branch information
Showing
25 changed files
with
627 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# NAME | ||
**kk add nodes**: Add nodes to the cluster according to the new nodes information from the specified configuration file. | ||
|
||
# DESCRIPTION | ||
Add nodes to the cluster according to the new nodes information from the specified configuration file. You need to add new node's information to the cluster config file first, then apply the changes. | ||
|
||
# OPTIONS | ||
|
||
## **--filename, -f** | ||
Path to a configuration file. | ||
|
||
## **--skip-pull-images** | ||
Skip pre pull images. The default is `false`. | ||
|
||
## **--container-manager** | ||
Container manager: docker, crio, containerd and isula. The default is `docker`. | ||
|
||
## **--download-cmd** | ||
The user defined command to download the necessary binary files. The first param `%s` is output path, the second param `%s`, is the URL. The default is `curl -L -o %s %s`. | ||
|
||
## **--artifact, -a** | ||
Path to a KubeKey artifact. | ||
|
||
## **--with-packages** | ||
Install operating system packages by artifact. The default is `false`. | ||
|
||
## **--in-cluster** | ||
Running inside the cluster. The default is `false`. | ||
|
||
## **--debug** | ||
Print detailed information. The default is `false`. | ||
|
||
## **--yes, -y** | ||
Skip confirm check. The default is `false`. | ||
|
||
## **--ignore-err** | ||
Ignore the error message, remove the host which reported error and force to continue. The default is `false`. | ||
|
||
# EXAMPLES | ||
Add nodes from the specified configuration file. | ||
``` | ||
$ kk add nodes -f config-sample.yaml | ||
``` | ||
Add nodes from the specified configuration file and use the artifact to install operating system packages. | ||
``` | ||
$ kk add nodes -f config-sample.yaml -a kubekey-artifact.tar.gz --with-packages | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# NAME | ||
**kk add**: Add nodes to kubernetes cluster. | ||
|
||
# DESCRIPTION | ||
Add nodes to kubernetes cluster. | ||
|
||
# COMMANDS | ||
| Command | Description | | ||
| - | - | | ||
| [kk add nodes](./kk-add-nodes.md) | Add nodes to the cluster according to the new nodes information from the specified configuration file. | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# NAME | ||
**kk artifact export**: Export a KubeKey offline installation package. | ||
|
||
# DESCRIPTION | ||
**kk** will base on the specify manifest file to pull all images, download the specified binaries and Linux repository iso file, then archive them as a KubeKey offline installation package. The export command will download the corresponding binaries from the Internet, so please make sure the network connection is success. And kk will pull the images by `containerd` if the length of manifest's images list is not 0, so make sure kk's work node has `containerd` or a minimum version of 18.09 `docker` installed. | ||
|
||
# OPTIONS | ||
|
||
## **--manifest, -m** | ||
Path to a manifest file. This option is required. | ||
|
||
## **--output, -o** | ||
Path to a output path The default is `kubekey-artifact.tar.gz`. | ||
|
||
## **--cri-socket** | ||
Path to the CRI socket to connect. If empty KubeKey will try to auto-detect this value. | ||
|
||
## **--download-cmd** | ||
The user defined command to download the necessary binary files. The first param `%s` is output path, the second param `%s`, is the URL. The default is `curl -L -o %s %s`. | ||
|
||
## **--debug** | ||
Print detailed information. The default is `false`. | ||
|
||
# EXAMPLES | ||
Export a KubeKey artifact named `my-artifact.tar.gz`. | ||
``` | ||
$ kk artifact export -m manifest-sample.yaml -o my-artifact.tar.gz | ||
``` | ||
Export a KubeKey artifact with a specify CRI socket. | ||
``` | ||
$ kk artifact export -m manifest-sample.yaml --cri-socket /run/containerd/containerd.sock | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# NAME | ||
**kk artifact images push**: Push images to a registry from a KubeKey artifact. | ||
|
||
# DESCRIPTION | ||
Push images to a registry from a KubeKey artifact. | ||
|
||
# OPTIONS | ||
|
||
## **--filename, -f** | ||
Path to a configuration file. | ||
|
||
## **--images-dir** | ||
Path to a KubeKey artifact images directory (e.g. ./kubekey/images). | ||
|
||
## **--artifact, -a** | ||
Path to a KubeKey artifact. | ||
|
||
## **--debug** | ||
Print detailed information. The default is `false`. | ||
|
||
# EXAMPLES | ||
Push the image to the private image registry. | ||
``` | ||
$ kk artifact images push -f config-sample.yaml -a kubekey-artifact.tar.gz | ||
``` | ||
Push the image to the private image registry from a specify directory. | ||
``` | ||
$ kk artifact images push -f config-sample.yaml --images-dir ./kubekey/images | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# NAME | ||
**kk artifact images**: Manage KubeKey artifact image. | ||
|
||
# ALIASES | ||
**kk artifact image** *command* | ||
|
||
**kk artifact i** *command* | ||
|
||
# DESCRIPTION | ||
Manage KubeKey artifact image. | ||
|
||
# COMMANDS | ||
| Command | Description | | ||
| - | - | | ||
| [kk artifact images push](./kk-artifact-images-push.md) | Push images to a registry from a KubeKey artifact. | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# NAME | ||
**kk artifact**: Manage a KubeKey offline installation package. | ||
|
||
# DESCRIPTION | ||
Manage a KubeKey offline installation package. More information about the KubeKey artifact format can be found [here](../manifest_and_artifact.md). | ||
|
||
# COMMANDS | ||
| Command | Description | | ||
| - | - | | ||
| [kk artifact export](./kk-artifact-export.md) | Export a KubeKey offline installation package. | | ||
| [kk artifact images](./kk-artifact-images.md) | Manage KubeKey artifact images | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# NAME | ||
**kk certs check-expiration**: Check certificates expiration for a Kubernetes cluster. | ||
|
||
# DESCRIPTION | ||
Check certificates expiration for a Kubernetes cluster. | ||
|
||
# OPTIONS | ||
|
||
## **--filename, -f** | ||
Path to a configuration file. This option is required. | ||
|
||
# EXAMPLES | ||
``` | ||
$ kk certs check-expirtation -f config-example.yaml | ||
``` | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# NAME | ||
**kk certs renew**: Renew a cluster certs | ||
|
||
# DESCRIPTION | ||
Renew a cluster certs. | ||
|
||
# OPTIONS | ||
|
||
## **--filename, -f** | ||
Path to a configuration file. This option is required. | ||
|
||
# EXAMPLES | ||
``` | ||
$ kk certs renew -f config-example.yaml | ||
``` | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# NAME | ||
**kk certs**:Manage cluster certs | ||
|
||
# DESCRIPTION | ||
Manage cluster certs. | ||
|
||
# COMMANDS | ||
| Command | Description | | ||
| - | - | | ||
| [kk certs check-expiration](./kk-certs-check-expiration.md) | Check certificates expiration for a Kubernetes cluster. | | ||
| [kk certs renew](./kk-certs-renew.md) | Renew a cluster certs. | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# NAME | ||
**kk completion**: Generate shell completion scripts. | ||
|
||
# DESCRIPTION | ||
Generate shell completion scripts. Normally you don't need to do more extra work to have this feature if you've installed kk by brew. | ||
|
||
# OPTIONS | ||
|
||
## **--type** | ||
Generate different types of shell. | ||
|
||
# EXAMPLES | ||
Installing bash completion on Linux. | ||
If bash-completion is not installed on Linux, please install the 'bash-completion' package via your distribution's package manager. | ||
Load the ks completion code for bash into the current shell. | ||
``` | ||
source <(ks completion bash) | ||
``` | ||
Write bash completion code to a file and source if from .bash_profile. | ||
``` | ||
mkdir -p ~/.config/kk/ && kk completion --type bash > ~/.config/kk/completion.bash.inc | ||
printf " | ||
``` | ||
kk shell completion. | ||
``` | ||
source '$HOME/.config/kk/completion.bash.inc' | ||
" >> $HOME/.bash_profile | ||
source $HOME/.bash_profile | ||
``` | ||
|
||
In order to have good experience on zsh completion, ohmyzsh is a good choice. | ||
Please install ohmyzsh by the following command. | ||
``` | ||
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" | ||
``` | ||
Get more details about onmyzsh from: https://github.com/ohmyzsh/ohmyzsh | ||
|
||
Load the kk completion code for zsh[1] into the current shell. | ||
``` | ||
source <(kk completion --type zsh) | ||
``` | ||
Set the kk completion code for zsh[1] to autoload on startup. | ||
``` | ||
kk completion --type zsh > "${fpath[1]}/_kk" | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
# NAME | ||
**kk create cluster**: Add nodes to the cluster according to the new nodes information from the specified configuration file. | ||
|
||
# DESCRIPTION | ||
Add nodes to the cluster according to the new nodes information from the specified configuration file. You need to add new node's information to the cluster config file first, then apply the changes. | ||
|
||
# OPTIONS | ||
|
||
## **--artifact, -a** | ||
Path to a KubeKey artifact. | ||
|
||
## **--certificates-dir** | ||
Specifies where to store or look for all required certificates. | ||
|
||
## **--container-manager** | ||
Container manager: docker, crio, containerd and isula. The default is `docker`. | ||
|
||
## **--debug** | ||
Print detailed information. The default is `false`. | ||
|
||
## **--download-cmd** | ||
The user defined command to download the necessary binary files. The first param `%s` is output path, the second param `%s`, is the URL. The default is `curl -L -o %s %s`. | ||
|
||
## **--filename, -f** | ||
Path to a configuration file. | ||
|
||
## **--ignore-err** | ||
Ignore the error message, remove the host which reported error and force to continue. The default is `false`. | ||
|
||
## **--in-cluster** | ||
Running inside the cluster. The default is `false`. | ||
|
||
## **--skip-pull-images** | ||
Skip pre pull images. The default is `false`. | ||
|
||
## **--skip-push-images** | ||
Skip pre push images. The default is `false`. | ||
|
||
## **--with-kubernetes** | ||
Specify a supported version of kubernetes. It will override the version of kubernetes in the config file. | ||
|
||
## **--with-kubesphere** | ||
Deploy a specific version of kubesphere. It will override the kubesphere `ClusterConfiguration` in the config file with the default value. | ||
|
||
## **--with-local-storage** | ||
Deploy a local PV provisioner. | ||
|
||
## **--with-packages** | ||
Install operating system packages by artifact. The default is `false`. | ||
|
||
## **--yes, -y** | ||
Skip confirm check. The default is `false`. | ||
|
||
# EXAMPLES | ||
Create an `all-in-one` pure Kubernetes cluster with default version. | ||
``` | ||
$ kk create cluster | ||
``` | ||
Create a Kubernetes and KubeSphere cluster with a specified version. | ||
``` | ||
$ kk create cluster --with-kubernetes v1.21.5 --with-kubesphere v3.2.1 | ||
``` | ||
Create a cluster using the configuration file. | ||
``` | ||
$ kk create cluster -f config-sample.yaml | ||
``` | ||
Create a cluster from the specified configuration file and use the artifact to install operating system packages. | ||
``` | ||
$ kk create cluster -f config-sample.yaml -a kubekey-artifact.tar.gz --with-packages | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# NAME | ||
**kk create config**: Create cluster configuration file | ||
|
||
# DESCRIPTION | ||
Create cluster configuration file. More information about the configuration file can be found in the [config-example.yaml](../config-example.md). | ||
|
||
# OPTIONS | ||
|
||
## **--debug** | ||
Print detailed information. The default is `false`. | ||
|
||
## **--filename, -f** | ||
Specify the configuration file output path. The deafult is `./config-example.yaml`. | ||
|
||
## **--from-cluster** | ||
Create a configuration based on existing cluster. Usually used in conjunction with the ``--kubeconfig`` option. | ||
|
||
## **--kubeconfig** | ||
Specify a kubeconfig file. | ||
|
||
## **--name** | ||
Specify a name of cluster object. The default is `sample`. | ||
|
||
## **--with-kubernetes** | ||
Specify a supported version of kubernetes. | ||
|
||
## **--with-kubesphere** | ||
Deploy a specific version of kubesphere. It will generate the kubesphere `ClusterConfiguration` in the config file with the default value. | ||
|
||
# EXAMPLES | ||
Create an example configuration file with default Kubernetes version. | ||
``` | ||
$ kk create config | ||
``` | ||
Create a Kubernetes and KubeSphere example configuration file with a specified version. | ||
``` | ||
$ kk create config --with-kubernetes v1.21.5 --with-kubesphere v3.2.1 | ||
``` | ||
Create a example configuration file based on existing cluster | ||
``` | ||
$ kk create config --from-cluster --kubeconfig ~/.kube/config | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# NAME | ||
**kk create manifest**: Create an offline installation package configuration file. | ||
|
||
# DESCRIPTION | ||
Create an offline installation package configuration file. This command requires preparing a cluster environment that has been installed a Kubernetes cluster and providing the `kube config` file of the cluster for **kk**. More information about the KubeKey manifest file can be found in the [KubeKey Manifest and Artifact](../manifest_and_artifact.md) and [manifest-example.yaml](../manifest-example.md). | ||
|
||
# OPTIONS | ||
|
||
## **--debug** | ||
Print detailed information. The default is `false`. | ||
|
||
## **--filename, -f** | ||
Specify the manifest file output path. The default is `./manifest-example.yaml`. | ||
|
||
## **--kubeconfig** | ||
Specify a kubeconfig file. The default is `$HOME/.kube/config`. | ||
|
||
## **--name** | ||
Specify a name of manifest object. The default is `sample`. | ||
|
||
# EXAMPLES | ||
Create an example manifest file based on the default `kube config ($HOME/.kube/config)` path. | ||
``` | ||
$ kk create manifest | ||
``` | ||
Create a manifest file with a specified `kube config` path. | ||
``` | ||
$ kk create manifest --kubeconfig /root/.kube/config | ||
``` | ||
|
Oops, something went wrong.