mirror of https://github.com/knative/client.git
update status of commands (#1508)
* update status of commands * update status of commands * update status of commands * update status of commands * update status of commands * update status of commands * update status of commands
This commit is contained in:
parent
4fb6bdb95a
commit
8e3a09cf7f
|
|
@ -10,16 +10,16 @@ kn container add NAME
|
|||
|
||||
```
|
||||
|
||||
The command is experimental and may change in the future releases.
|
||||
The command is Beta and may change in the future releases.
|
||||
|
||||
The 'container add' represents utility command that prints YAML container spec to standard output. It's useful for
|
||||
multi-container use cases to create definition with help of standard 'kn' option flags. It accepts all container related
|
||||
flag available for 'service create'. The command can be chained through Unix pipes to create multiple containers at once.
|
||||
|
||||
# Add a container 'sidecar' from image 'docker.io/example/sidecar' and print it to standard output
|
||||
# Add a container 'sidecar' from image 'docker.io/example/sidecar' and print it to standard output (Beta)
|
||||
kn container add sidecar --image docker.io/example/sidecar
|
||||
|
||||
# Add command can be chained by standard Unix pipe symbol '|' and passed to 'service add|update|apply' commands
|
||||
# Add command can be chained by standard Unix pipe symbol '|' and passed to 'service add|update|apply' commands (Beta)
|
||||
kn container add sidecar --image docker.io/example/sidecar:first | \
|
||||
kn container add second --image docker.io/example/sidecar:second | \
|
||||
kn service create myksvc --image docker.io/example/my-app:latest --containers -
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ kn domain update NAME
|
|||
```
|
||||
|
||||
# Update a domain mappings 'hello.example.com' for Knative service 'hello'
|
||||
kn domain create hello.example.com --refFlags hello
|
||||
kn domain update hello.example.com --refFlags hello
|
||||
```
|
||||
|
||||
### Options
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ kn service create NAME --image IMAGE
|
|||
# [https://kubernetes.io/docs/tasks/manage-gpus/scheduling-gpus/]
|
||||
kn service create s4gpu --image knativesamples/hellocuda-go --request memory=250Mi,cpu=200m --limit nvidia.com/gpu=1
|
||||
|
||||
# Create the service in offline mode instead of kubernetes cluster
|
||||
# Create the service in offline mode instead of kubernetes cluster (Beta)
|
||||
kn service create gitopstest -n test-ns --image knativesamples/helloworld --target=/user/knfiles
|
||||
kn service create gitopstest --image knativesamples/helloworld --target=/user/knfiles/test.yaml
|
||||
kn service create gitopstest --image knativesamples/helloworld --target=/user/knfiles/test.json
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ kn service delete NAME [NAME ...]
|
|||
# Delete all services in 'ns1' namespace
|
||||
kn service delete --all -n ns1
|
||||
|
||||
# Delete the services in offline mode instead of kubernetes cluster
|
||||
# Delete the services in offline mode instead of kubernetes cluster (Beta)
|
||||
kn service delete test -n test-ns --target=/user/knfiles
|
||||
kn service delete test --target=/user/knfiles/test.yaml
|
||||
kn service delete test --target=/user/knfiles/test.json
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ kn service describe NAME
|
|||
# Print only service URL
|
||||
kn service describe svc -o url
|
||||
|
||||
# Describe the services in offline mode instead of kubernetes cluster
|
||||
# Describe the services in offline mode instead of kubernetes cluster (Beta)
|
||||
kn service describe test -n test-ns --target=/user/knfiles
|
||||
kn service describe test --target=/user/knfiles/test.yaml
|
||||
kn service describe test --target=/user/knfiles/test.json
|
||||
|
|
|
|||
|
|
@ -10,16 +10,16 @@ kn service export NAME
|
|||
|
||||
```
|
||||
|
||||
# Export a service in YAML format
|
||||
# Export a service in YAML format (Beta)
|
||||
kn service export foo -n bar -o yaml
|
||||
|
||||
# Export a service in JSON format
|
||||
# Export a service in JSON format (Beta)
|
||||
kn service export foo -n bar -o json
|
||||
|
||||
# Export a service with revisions
|
||||
# Export a service with revisions (Beta)
|
||||
kn service export foo --with-revisions --mode=export -n bar -o json
|
||||
|
||||
# Export services in kubectl friendly format, as a list kind, one service item for each revision
|
||||
# Export services in kubectl friendly format, as a list kind, one service item for each revision (Beta)
|
||||
kn service export foo --with-revisions --mode=replay -n bar -o json
|
||||
```
|
||||
|
||||
|
|
@ -28,12 +28,12 @@ kn service export NAME
|
|||
```
|
||||
--allow-missing-template-keys If true, ignore any errors in templates when a field or map key is missing in the template. Only applies to golang and jsonpath output formats. (default true)
|
||||
-h, --help help for export
|
||||
--mode string Format for exporting all routed revisions. One of replay|export (experimental)
|
||||
--mode string Format for exporting all routed revisions. One of replay|export (Beta)
|
||||
-n, --namespace string Specify the namespace to operate in.
|
||||
-o, --output string Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile|jsonpath|jsonpath-as-json|jsonpath-file.
|
||||
--show-managed-fields If true, keep the managedFields when printing objects in JSON or YAML format.
|
||||
--template string Template string or path to template file to use when -o=go-template, -o=go-template-file. The template format is golang templates [http://golang.org/pkg/text/template/#pkg-overview].
|
||||
--with-revisions Export all routed revisions (experimental)
|
||||
--with-revisions Export all routed revisions (Beta)
|
||||
```
|
||||
|
||||
### Options inherited from parent commands
|
||||
|
|
|
|||
|
|
@ -10,10 +10,10 @@ kn service import FILENAME
|
|||
|
||||
```
|
||||
|
||||
# Import a service from YAML file
|
||||
# Import a service from YAML file (Beta)
|
||||
kn service import /path/to/file.yaml
|
||||
|
||||
# Import a service from JSON file
|
||||
# Import a service from JSON file (Beta)
|
||||
kn service import /path/to/file.json
|
||||
```
|
||||
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ kn service list
|
|||
# List service 'web'
|
||||
kn service list web
|
||||
|
||||
# List the services in offline mode instead of kubernetes cluster
|
||||
# List the services in offline mode instead of kubernetes cluster (Beta)
|
||||
kn service list --target=/user/knfiles
|
||||
kn service list --target=/user/knfiles/test.json
|
||||
kn service list --target=/user/knfiles/test.yaml
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ kn service update NAME
|
|||
# rest will automatically be directed to echo-v3 (the remaining revision)
|
||||
kn service update svc --traffic stable=50,staging=40
|
||||
|
||||
# Update the service in offline mode instead of kubernetes cluster
|
||||
# Update the service in offline mode instead of kubernetes cluster (Beta)
|
||||
kn service update gitopstest -n test-ns --env KEY1=VALUE1 --target=/user/knfiles
|
||||
kn service update gitopstest --env KEY1=VALUE1 --target=/user/knfiles/test.yaml
|
||||
kn service update gitopstest --env KEY1=VALUE1 --target=/user/knfiles/test.json
|
||||
|
|
|
|||
|
|
@ -33,16 +33,16 @@ func NewContainerAddCommand(p *commands.KnParams) *cobra.Command {
|
|||
Use: "add NAME",
|
||||
Short: "Add a container",
|
||||
Example: `
|
||||
The command is experimental and may change in the future releases.
|
||||
The command is Beta and may change in the future releases.
|
||||
|
||||
The 'container add' represents utility command that prints YAML container spec to standard output. It's useful for
|
||||
multi-container use cases to create definition with help of standard 'kn' option flags. It accepts all container related
|
||||
flag available for 'service create'. The command can be chained through Unix pipes to create multiple containers at once.
|
||||
|
||||
# Add a container 'sidecar' from image 'docker.io/example/sidecar' and print it to standard output
|
||||
# Add a container 'sidecar' from image 'docker.io/example/sidecar' and print it to standard output (Beta)
|
||||
kn container add sidecar --image docker.io/example/sidecar
|
||||
|
||||
# Add command can be chained by standard Unix pipe symbol '|' and passed to 'service add|update|apply' commands
|
||||
# Add command can be chained by standard Unix pipe symbol '|' and passed to 'service add|update|apply' commands (Beta)
|
||||
kn container add sidecar --image docker.io/example/sidecar:first | \
|
||||
kn container add second --image docker.io/example/sidecar:second | \
|
||||
kn service create myksvc --image docker.io/example/my-app:latest --containers -`,
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ func NewDomainMappingUpdateCommand(p *commands.KnParams) *cobra.Command {
|
|||
Short: "Update a domain mapping",
|
||||
Example: `
|
||||
# Update a domain mappings 'hello.example.com' for Knative service 'hello'
|
||||
kn domain create hello.example.com --refFlags hello`,
|
||||
kn domain update hello.example.com --refFlags hello`,
|
||||
RunE: func(cmd *cobra.Command, args []string) (err error) {
|
||||
if len(args) != 1 {
|
||||
return errors.New("'kn domain create' requires the domain name given as single argument")
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ var create_example = `
|
|||
# [https://kubernetes.io/docs/tasks/manage-gpus/scheduling-gpus/]
|
||||
kn service create s4gpu --image knativesamples/hellocuda-go --request memory=250Mi,cpu=200m --limit nvidia.com/gpu=1
|
||||
|
||||
# Create the service in offline mode instead of kubernetes cluster
|
||||
# Create the service in offline mode instead of kubernetes cluster (Beta)
|
||||
kn service create gitopstest -n test-ns --image knativesamples/helloworld --target=/user/knfiles
|
||||
kn service create gitopstest --image knativesamples/helloworld --target=/user/knfiles/test.yaml
|
||||
kn service create gitopstest --image knativesamples/helloworld --target=/user/knfiles/test.json`
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ func NewServiceDeleteCommand(p *commands.KnParams) *cobra.Command {
|
|||
# Delete all services in 'ns1' namespace
|
||||
kn service delete --all -n ns1
|
||||
|
||||
# Delete the services in offline mode instead of kubernetes cluster
|
||||
# Delete the services in offline mode instead of kubernetes cluster (Beta)
|
||||
kn service delete test -n test-ns --target=/user/knfiles
|
||||
kn service delete test --target=/user/knfiles/test.yaml
|
||||
kn service delete test --target=/user/knfiles/test.json`,
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@ var describe_example = `
|
|||
# Print only service URL
|
||||
kn service describe svc -o url
|
||||
|
||||
# Describe the services in offline mode instead of kubernetes cluster
|
||||
# Describe the services in offline mode instead of kubernetes cluster (Beta)
|
||||
kn service describe test -n test-ns --target=/user/knfiles
|
||||
kn service describe test --target=/user/knfiles/test.yaml
|
||||
kn service describe test --target=/user/knfiles/test.json`
|
||||
|
|
|
|||
|
|
@ -84,16 +84,16 @@ func NewServiceExportCommand(p *commands.KnParams) *cobra.Command {
|
|||
Use: "export NAME",
|
||||
Short: "Export a service and its revisions",
|
||||
Example: `
|
||||
# Export a service in YAML format
|
||||
# Export a service in YAML format (Beta)
|
||||
kn service export foo -n bar -o yaml
|
||||
|
||||
# Export a service in JSON format
|
||||
# Export a service in JSON format (Beta)
|
||||
kn service export foo -n bar -o json
|
||||
|
||||
# Export a service with revisions
|
||||
# Export a service with revisions (Beta)
|
||||
kn service export foo --with-revisions --mode=export -n bar -o json
|
||||
|
||||
# Export services in kubectl friendly format, as a list kind, one service item for each revision
|
||||
# Export services in kubectl friendly format, as a list kind, one service item for each revision (Beta)
|
||||
kn service export foo --with-revisions --mode=replay -n bar -o json`,
|
||||
RunE: func(cmd *cobra.Command, args []string) error {
|
||||
if len(args) != 1 {
|
||||
|
|
@ -127,8 +127,8 @@ func NewServiceExportCommand(p *commands.KnParams) *cobra.Command {
|
|||
}
|
||||
flags := command.Flags()
|
||||
commands.AddNamespaceFlags(flags, false)
|
||||
flags.Bool("with-revisions", false, "Export all routed revisions (experimental)")
|
||||
flags.String("mode", "", "Format for exporting all routed revisions. One of replay|export (experimental)")
|
||||
flags.Bool("with-revisions", false, "Export all routed revisions (Beta)")
|
||||
flags.String("mode", "", "Format for exporting all routed revisions. One of replay|export (Beta)")
|
||||
machineReadablePrintFlags.AddFlags(command)
|
||||
return command
|
||||
}
|
||||
|
|
|
|||
|
|
@ -43,10 +43,10 @@ func NewServiceImportCommand(p *commands.KnParams) *cobra.Command {
|
|||
Use: "import FILENAME",
|
||||
Short: "Import a service and its revisions (experimental)",
|
||||
Example: `
|
||||
# Import a service from YAML file
|
||||
# Import a service from YAML file (Beta)
|
||||
kn service import /path/to/file.yaml
|
||||
|
||||
# Import a service from JSON file
|
||||
# Import a service from JSON file (Beta)
|
||||
kn service import /path/to/file.json`,
|
||||
RunE: func(cmd *cobra.Command, args []string) error {
|
||||
if len(args) != 1 {
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ func NewServiceListCommand(p *commands.KnParams) *cobra.Command {
|
|||
# List service 'web'
|
||||
kn service list web
|
||||
|
||||
# List the services in offline mode instead of kubernetes cluster
|
||||
# List the services in offline mode instead of kubernetes cluster (Beta)
|
||||
kn service list --target=/user/knfiles
|
||||
kn service list --target=/user/knfiles/test.json
|
||||
kn service list --target=/user/knfiles/test.yaml
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ var updateExample = `
|
|||
# rest will automatically be directed to echo-v3 (the remaining revision)
|
||||
kn service update svc --traffic stable=50,staging=40
|
||||
|
||||
# Update the service in offline mode instead of kubernetes cluster
|
||||
# Update the service in offline mode instead of kubernetes cluster (Beta)
|
||||
kn service update gitopstest -n test-ns --env KEY1=VALUE1 --target=/user/knfiles
|
||||
kn service update gitopstest --env KEY1=VALUE1 --target=/user/knfiles/test.yaml
|
||||
kn service update gitopstest --env KEY1=VALUE1 --target=/user/knfiles/test.json`
|
||||
|
|
|
|||
Loading…
Reference in New Issue