mirror of https://github.com/istio/istio.io.git
Document all CLI options (#55)
This commit is contained in:
parent
c0e22abd4d
commit
9c151e299d
|
@ -9,22 +9,22 @@ layout: docs
|
|||
type: markdown
|
||||
---
|
||||
|
||||
`istioctl` is a command line interface for managing an Istio service mesh. This overview covers
|
||||
**istioctl** is a command line interface for managing an Istio service mesh. This overview covers
|
||||
syntax, describes command operations, and provides examples.
|
||||
|
||||
# Syntax
|
||||
|
||||
Istioctl commands follow the syntax:
|
||||
*istioctl* commands follow the syntax:
|
||||
|
||||
```
|
||||
```shell
|
||||
istioctl <command> [targets] [flags]
|
||||
```
|
||||
|
||||
where `command`, `targets` and `flags` are:
|
||||
where *command*, *targets* and *flags* are:
|
||||
|
||||
* **command**: the operation to perform, such as `create`, `delete`, `replace`, or `list`.
|
||||
* **targets**: targets for commands such as delete
|
||||
* **flags**: Optional flags. For example specify `--file <filename>` to specify a configuration file to create from.
|
||||
* **flags**: Optional flags. For example specify `--file FILENAME` to specify a configuration file to create from.
|
||||
|
||||
# Operations
|
||||
|
||||
|
@ -34,11 +34,11 @@ where `command`, `targets` and `flags` are:
|
|||
* **replace**: Replace policies and rules
|
||||
* **version**: Display CLI version information
|
||||
|
||||
_kubernetes specific_
|
||||
* **kube-inject**: Inject istio runtime proxy into kubernetes
|
||||
resources. This command has been added to aid in `istiofying`
|
||||
services for kubernetes and should eventually go away once a proper
|
||||
istio admission controller for kubernetes is available.
|
||||
_Kubernetes specific_
|
||||
* **kube-inject**: Inject Envoy proxy into Kubernetes Pods
|
||||
resources. This command has been added to aid in *istiofying*
|
||||
services for Kubernetes and should eventually go away once a proper
|
||||
Istio admission controller for Kubernetes is available.
|
||||
|
||||
# Policy and Rule types
|
||||
|
||||
|
@ -47,35 +47,52 @@ _kubernetes specific_
|
|||
|
||||
# Examples of common operations
|
||||
|
||||
`istioctl create` - Create policies or rules from a file or stdin.
|
||||
`istioctl create [--file FILE]` - Create policies or rules from a file or stdin.
|
||||
|
||||
```
|
||||
// Create a rule using the definition in example-routing.yaml.
|
||||
```shell
|
||||
# Create a rule using the definition in example-routing.yaml.
|
||||
$ istioctl create -f example-routing.yaml
|
||||
```
|
||||
|
||||
`istioctl delete` - Create policies or rules from a file or stdin.
|
||||
`istioctl delete [TYPE NAME_1 ... NAME_N] [--file FILE]` - Create policies or rules from a file or stdin.
|
||||
|
||||
```
|
||||
// Delete a rule using the definition in example-routing.yaml.
|
||||
```shell
|
||||
# Delete a rule using the definition in example-routing.yaml.
|
||||
$ istioctl delete -f example-routing.yaml
|
||||
```
|
||||
|
||||
`istioctl get` - List policies or rules in YAML format
|
||||
|
||||
```shell
|
||||
# Delete the rule productpage-default
|
||||
$ istioctl delete route-rule productpage-default
|
||||
```
|
||||
// List route rules
|
||||
|
||||
`istioctl get TYPE [NAME] [--output yaml|short]` - List policies or rules in YAML format
|
||||
|
||||
```shell
|
||||
# List route rules
|
||||
istioctl get route-rules
|
||||
|
||||
// List destination policies
|
||||
# List destination policies
|
||||
istioctl get destination-policies
|
||||
|
||||
# Get the rule productpage-default
|
||||
istioctl get route-rule productpage-default
|
||||
```
|
||||
|
||||
`istioctl replace [--file FILENAME]` - Replace existing policies or rules with another from a file or stdin.
|
||||
|
||||
```shell
|
||||
# Create a rule using the definition in example-routing.yaml.
|
||||
$ istioctl replace -f example-routing.yaml
|
||||
```
|
||||
|
||||
# kube-inject
|
||||
|
||||
`istioctl kube-inject [--filename FILENAME] [--hub HUB] [--meshConfig CONFIGMAP_NAME] [--output FILENAME] [--setVersionString VERSION] [--sidecarProxyUID UID] [--tag TAG] [--verbosity VERBOSITY]` - add Istio components to description
|
||||
|
||||
A short term workaround for the lack of a proper istio admision
|
||||
controller is client-side injection. Use `istioctl kube-inject` to add the
|
||||
necessary configurations to a kubernetes resource files.
|
||||
necessary configurations to a Kubernetes resource files.
|
||||
|
||||
istioctl kube-inject -f deployment.yaml -o deployment-with-istio.yaml
|
||||
|
||||
|
@ -88,8 +105,8 @@ Or update an existing deployment.
|
|||
kubectl get deployment -o yaml | istioctl kube-inject -f - | kubectl apply -f -
|
||||
|
||||
`istioctl kube-inject` will update
|
||||
the [PodTemplateSpec](https://kubernetes.io/docs/api-reference/v1/definitions/#_v1_podtemplatespec) in
|
||||
kubernetes Job, DaemonSet, ReplicaSet, and Deployment YAML resource
|
||||
the [PodTemplateSpec](https://kubernetes.io/docs/concepts/workloads/pods/pod-overview/#pod-templates) in
|
||||
Kubernetes Job, DaemonSet, ReplicaSet, and Deployment YAML resource
|
||||
documents. Support for additional pod-based resource types can be
|
||||
added as necessary.
|
||||
|
||||
|
@ -101,3 +118,22 @@ application.
|
|||
The Istio project is continually evolving so the low-level proxy
|
||||
configuration may change unannounced. When in doubt re-run `istioctl kube-inject`
|
||||
on your original deployments.
|
||||
|
||||
## kube-inject flags
|
||||
|
||||
* `--coreDump` - Enable/Disable core dumps in injected proxy (--coreDump=true affects all pods in a node and should only be used the cluster admin) (default true)
|
||||
* `--filename FILENAME` - Input kubernetes resource filename
|
||||
* `--hub HUB` - Docker hub, for example docker.io/istio)
|
||||
* `--meshConfig CONFIGMAP_NAME` - ConfigMap name for Istio mesh configuration, key should be "mesh" (default "istio")
|
||||
* `--output FILENAME` - Modified output kubernetes resource filename
|
||||
* `--setVersionString VERSION` - Override version info injected into resource
|
||||
* `--sidecarProxyUID UID` - Sidecar proxy UID (default 1337)
|
||||
* `--tag TAG` - Docker image file tag
|
||||
* `--verbosity VERBOSITY` - Runtime verbosity (default 2)
|
||||
|
||||
# General command line flags
|
||||
|
||||
* `--kubeconfig FILENAME` - Use a Kubernetes configuration file instead of in-cluster configuration. (default _~/.kube/config_)
|
||||
* `--namespace NAMESPACE` - Kubernetes namespace (default "default")
|
||||
* `--v LEVEL` - log level for V logs
|
||||
* `--vmodule MODULESPEC` - comma-separated list of pattern=N settings for file-filtered logging
|
||||
|
|
Loading…
Reference in New Issue