Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: update sealer command document via cobra #1479

Merged
merged 1 commit into from
Jun 8, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 35 additions & 19 deletions docs/commandline/sealer.md
Original file line number Diff line number Diff line change
@@ -1,35 +1,51 @@
## sealer

A tool to build, share and run any distributed applications.

### Synopsis

sealer is a tool to seal application's all dependencies and Kubernetes
into ClusterImage by Kubefile, distribute this application anywhere via ClusterImage,
and run it within any cluster with Clusterfile in one command.


### Options

```
--config string config file (default is $HOME/.sealer.json)
--config string config file of sealer tool (default is $HOME/.sealer.json)
-d, --debug turn on debug mode
-h, --help help for sealer
--hide-path hide the log path
--hide-time hide the log time
-t, --toggle Help message for toggle
```

### SEE ALSO

* [sealer apply](sealer_apply.md) - apply a kubernetes cluster
* [sealer build](sealer_build.md) - ClusterImage local build command line
* [sealer check](sealer_check.md) - check the state of cluster
* [sealer apply](sealer_apply.md) - apply a Kubernetes cluster via specified Clusterfile
* [sealer build](sealer_build.md) - build a ClusterImage from a Kubefile
* [sealer cert](sealer_cert.md) - update Kubernetes API server's cert
* [sealer check](sealer_check.md) - check the state of cluster
* [sealer completion](sealer_completion.md) - generate autocompletion script for bash
* [sealer debug](sealer_debug.md) - Creating debugging sessions for pods and nodes
* [sealer delete](sealer_delete.md) - delete a cluster
* [sealer gen-doc](sealer_gen-doc.md) - Generate document for sealer CLI with MarkDown format
* [sealer images](sealer_images.md) - list all ClusterImages
* [sealer inspect](sealer_inspect.md) - print the image information or clusterFile
* [sealer join](sealer_join.md) - join node to cluster
* [sealer load](sealer_load.md) - load image
* [sealer login](sealer_login.md) - login image repositories
* [sealer pull](sealer_pull.md) - pull ClusterImage to local
* [sealer push](sealer_push.md) - push ClusterImage to registry
* [sealer rmi](sealer_rmi.md) - Remove local images by name or ID
* [sealer run](sealer_run.md) - run a cluster with images and arguments
* [sealer save](sealer_save.md) - save image
* [sealer tag](sealer_tag.md) - tag IMAGE[:TAG] TARGET_IMAGE[:TAG]
* [sealer version](sealer_version.md) - version
* [sealer debug](sealer_debug.md) - Create debugging sessions for pods and nodes
* [sealer delete](sealer_delete.md) - delete an existing cluster
* [sealer exec](sealer_exec.md) - exec a shell command or script on specified nodes.
* [sealer gen](sealer_gen.md) - generate a Clusterfile to take over a normal cluster which is not deployed by sealer
* [sealer gen-doc](sealer_gen-doc.md) - generate document for sealer CLI with MarkDown format
* [sealer images](sealer_images.md) - list all ClusterImages on the local node
* [sealer inspect](sealer_inspect.md) - print the image information or Clusterfile
* [sealer join](sealer_join.md) - join new master or worker node to specified cluster
* [sealer load](sealer_load.md) - load a ClusterImage from a tar file
* [sealer login](sealer_login.md) - login image registry
* [sealer merge](sealer_merge.md) - merge multiple images into one
* [sealer prune](sealer_prune.md) - prune sealer data dir
* [sealer pull](sealer_pull.md) - pull ClusterImage from a registry to local
* [sealer push](sealer_push.md) - push ClusterImage to remote registry
* [sealer rmi](sealer_rmi.md) - remove local images by name
* [sealer run](sealer_run.md) - start to run a cluster from a ClusterImage
* [sealer save](sealer_save.md) - save ClusterImage to a tar file
* [sealer search](sealer_search.md) - search ClusterImage in default registry
* [sealer tag](sealer_tag.md) - create a new tag that refers to a local ClusterImage
* [sealer upgrade](sealer_upgrade.md) - upgrade specified Kubernetes cluster
* [sealer version](sealer_version.md) - show sealer and related versions

17 changes: 13 additions & 4 deletions docs/commandline/sealer_apply.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
## sealer apply

apply a kubernetes cluster
apply a Kubernetes cluster via specified Clusterfile

### Synopsis

apply command is used to apply a Kubernetes cluster via specified Clusterfile.
If the Clusterfile is applied first time, Kubernetes cluster will be created. Otherwise, sealer
will apply the diff change of current Clusterfile and the original one.

```
sealer apply [flags]
Expand All @@ -15,18 +21,21 @@ sealer apply -f Clusterfile
### Options

```
-f, --Clusterfile string apply a kubernetes cluster (default "Clusterfile")
-f, --Clusterfile string Clusterfile path to apply a Kubernetes cluster (default "Clusterfile")
--force force to delete the specified cluster if set true
-h, --help help for apply
```

### Options inherited from parent commands

```
--config string config file (default is $HOME/.sealer.json)
--config string config file of sealer tool (default is $HOME/.sealer.json)
-d, --debug turn on debug mode
--hide-path hide the log path
--hide-time hide the log time
```

### SEE ALSO

* [sealer](sealer.md) -
* [sealer](sealer.md) - A tool to build, share and run any distributed applications.

43 changes: 25 additions & 18 deletions docs/commandline/sealer_build.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
## sealer build

ClusterImage local build command line
build a ClusterImage from a Kubefile

### Synopsis

sealer build -f Kubefile -t my-kubernetes:1.19.9 [--mode cloud|container|lite] [--no-cache]
build command is used to build a ClusterImage from specified Kubefile.
It organizes the specified Kubefile and input building context, and builds
a brand new ClusterImage.

```
sealer build [flags] PATH
Expand All @@ -13,40 +15,45 @@ sealer build [flags] PATH
### Examples

```
the current path is the context path ,default build type is cloud and use build cache
the current path is the context path, default build type is lite and use build cache

cloud build :
sealer build -f Kubefile -t my-kubernetes:1.19.9
build:
sealer build -f Kubefile -t my-kubernetes:1.19.8 .

container build :
sealer build -f Kubefile -t my-kubernetes:1.19.9 -m container
build without cache:
sealer build -f Kubefile -t my-kubernetes:1.19.8 --no-cache .

lite build:
sealer build -f Kubefile -t my-kubernetes:1.19.9 --mode lite
build without base:
sealer build -f Kubefile -t my-kubernetes:1.19.8 --base=false .

build without cache:
sealer build -f Kubefile -t my-kubernetes:1.19.9 --no-cache
build with args:
sealer build -f Kubefile -t my-kubernetes:1.19.8 --build-arg MY_ARG=abc,PASSWORD=Sealer123 .

```

### Options

```
-m, --mode string ClusterImage build type,default is cloud
-h, --help help for build
-t, --imageName string ClusterImage name
-f, --kubefile string kubefile filepath (default "Kubefile")
--no-cache build without cache
--base build with base image, default value is true. (default true)
--build-arg strings set custom build args
-h, --help help for build
-t, --imageName string the name of ClusterImage
-f, --kubefile string Kubefile filepath (default "Kubefile")
-m, --mode string ClusterImage build type, default is lite (default "lite")
--no-cache build without cache
--platform string set ClusterImage platform. If not set, keep same platform with runtime
```

### Options inherited from parent commands

```
--config string config file (default is $HOME/.sealer.json)
--config string config file of sealer tool (default is $HOME/.sealer.json)
-d, --debug turn on debug mode
--hide-path hide the log path
--hide-time hide the log time
```

### SEE ALSO

* [sealer](sealer.md) -
* [sealer](sealer.md) - A tool to build, share and run any distributed applications.

43 changes: 43 additions & 0 deletions docs/commandline/sealer_cert.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
## sealer cert

update Kubernetes API server's cert

### Synopsis

Add domain or ip in certs:
you had better backup old certs first.
sealer cert --alt-names sealer.cool,10.103.97.2,127.0.0.1,localhost
using "openssl x509 -noout -text -in apiserver.crt" to check the cert
will update cluster API server cert, you need to restart your API server manually after using sealer cert.

For example: add an EIP to cert.
1. sealer cert --alt-names 39.105.169.253
2. update the kubeconfig, cp /etc/kubernetes/admin.conf .kube/config
3. edit .kube/config, set the apiserver address as 39.105.169.253, (don't forget to open the security group port for 6443, if you using public cloud)
4. kubectl get pod, to check if it works or not


```
sealer cert [flags]
```

### Options

```
--alt-names string add domain or ip in certs, sealer.cool or 10.103.97.2
-h, --help help for cert
```

### Options inherited from parent commands

```
--config string config file of sealer tool (default is $HOME/.sealer.json)
-d, --debug turn on debug mode
--hide-path hide the log path
--hide-time hide the log time
```

### SEE ALSO

* [sealer](sealer.md) - A tool to build, share and run any distributed applications.

13 changes: 10 additions & 3 deletions docs/commandline/sealer_check.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
## sealer check

check the state of cluster
check the state of cluster

### Synopsis

check command is used to check status of the cluster, including node status
, service status and pod status.

```
sealer check [flags]
Expand All @@ -23,11 +28,13 @@ sealer check --pre or sealer check --post
### Options inherited from parent commands

```
--config string config file (default is $HOME/.sealer.json)
--config string config file of sealer tool (default is $HOME/.sealer.json)
-d, --debug turn on debug mode
--hide-path hide the log path
--hide-time hide the log time
```

### SEE ALSO

* [sealer](sealer.md) -
* [sealer](sealer.md) - A tool to build, share and run any distributed applications.

6 changes: 4 additions & 2 deletions docs/commandline/sealer_completion.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,13 @@ sealer completion
### Options inherited from parent commands

```
--config string config file (default is $HOME/.sealer.json)
--config string config file of sealer tool (default is $HOME/.sealer.json)
-d, --debug turn on debug mode
--hide-path hide the log path
--hide-time hide the log time
```

### SEE ALSO

* [sealer](sealer.md) -
* [sealer](sealer.md) - A tool to build, share and run any distributed applications.

10 changes: 6 additions & 4 deletions docs/commandline/sealer_debug.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
## sealer debug

Creating debugging sessions for pods and nodes
Create debugging sessions for pods and nodes

### Options

```
--check-list strings Check items, such as networkvolume.
--check-list strings Check items, such as network, volume.
-e, --env stringToString Environment variables to set in the container. (default [])
-h, --help help for debug
--image string Container image to use for debug container.
Expand All @@ -19,13 +19,15 @@ Creating debugging sessions for pods and nodes
### Options inherited from parent commands

```
--config string config file (default is $HOME/.sealer.json)
--config string config file of sealer tool (default is $HOME/.sealer.json)
-d, --debug turn on debug mode
--hide-path hide the log path
--hide-time hide the log time
```

### SEE ALSO

* [sealer](sealer.md) -
* [sealer](sealer.md) - A tool to build, share and run any distributed applications.
* [sealer debug clean](sealer_debug_clean.md) - Clean the debug container od pod
* [sealer debug node](sealer_debug_node.md) - Debug node
* [sealer debug pod](sealer_debug_pod.md) - Debug pod or container
Expand Down
8 changes: 5 additions & 3 deletions docs/commandline/sealer_debug_clean.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,12 @@ sealer debug clean [flags]
### Options inherited from parent commands

```
--check-list strings Check items, such as networkvolume.
--config string config file (default is $HOME/.sealer.json)
--check-list strings Check items, such as network, volume.
--config string config file of sealer tool (default is $HOME/.sealer.json)
-d, --debug turn on debug mode
-e, --env stringToString Environment variables to set in the container. (default [])
--hide-path hide the log path
--hide-time hide the log time
--image string Container image to use for debug container.
--image-pull-policy string Container image pull policy, default policy is IfNotPresent. (default "IfNotPresent")
--name string Container name to use for debug container.
Expand All @@ -29,5 +31,5 @@ sealer debug clean [flags]

### SEE ALSO

* [sealer debug](sealer_debug.md) - Creating debugging sessions for pods and nodes
* [sealer debug](sealer_debug.md) - Create debugging sessions for pods and nodes

8 changes: 5 additions & 3 deletions docs/commandline/sealer_debug_node.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,12 @@ sealer debug node [flags]
### Options inherited from parent commands

```
--check-list strings Check items, such as networkvolume.
--config string config file (default is $HOME/.sealer.json)
--check-list strings Check items, such as network, volume.
--config string config file of sealer tool (default is $HOME/.sealer.json)
-d, --debug turn on debug mode
-e, --env stringToString Environment variables to set in the container. (default [])
--hide-path hide the log path
--hide-time hide the log time
--image string Container image to use for debug container.
--image-pull-policy string Container image pull policy, default policy is IfNotPresent. (default "IfNotPresent")
--name string Container name to use for debug container.
Expand All @@ -29,5 +31,5 @@ sealer debug node [flags]

### SEE ALSO

* [sealer debug](sealer_debug.md) - Creating debugging sessions for pods and nodes
* [sealer debug](sealer_debug.md) - Create debugging sessions for pods and nodes

8 changes: 5 additions & 3 deletions docs/commandline/sealer_debug_pod.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,12 @@ sealer debug pod [flags]
### Options inherited from parent commands

```
--check-list strings Check items, such as networkvolume.
--config string config file (default is $HOME/.sealer.json)
--check-list strings Check items, such as network, volume.
--config string config file of sealer tool (default is $HOME/.sealer.json)
-d, --debug turn on debug mode
-e, --env stringToString Environment variables to set in the container. (default [])
--hide-path hide the log path
--hide-time hide the log time
--image string Container image to use for debug container.
--image-pull-policy string Container image pull policy, default policy is IfNotPresent. (default "IfNotPresent")
--name string Container name to use for debug container.
Expand All @@ -30,5 +32,5 @@ sealer debug pod [flags]

### SEE ALSO

* [sealer debug](sealer_debug.md) - Creating debugging sessions for pods and nodes
* [sealer debug](sealer_debug.md) - Create debugging sessions for pods and nodes

8 changes: 5 additions & 3 deletions docs/commandline/sealer_debug_show-images.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,12 @@ sealer debug show-images [flags]
### Options inherited from parent commands

```
--check-list strings Check items, such as networkvolume.
--config string config file (default is $HOME/.sealer.json)
--check-list strings Check items, such as network, volume.
--config string config file of sealer tool (default is $HOME/.sealer.json)
-d, --debug turn on debug mode
-e, --env stringToString Environment variables to set in the container. (default [])
--hide-path hide the log path
--hide-time hide the log time
--image string Container image to use for debug container.
--image-pull-policy string Container image pull policy, default policy is IfNotPresent. (default "IfNotPresent")
--name string Container name to use for debug container.
Expand All @@ -29,5 +31,5 @@ sealer debug show-images [flags]

### SEE ALSO

* [sealer debug](sealer_debug.md) - Creating debugging sessions for pods and nodes
* [sealer debug](sealer_debug.md) - Create debugging sessions for pods and nodes

Loading