istioctl

Istio control interface

Synopsis

Istio configuration command line utility.

Create, list, modify, and delete configuration resources in the Istio system.

Available routing and traffic management configuration types:

  1. [route-rule ingress-rule egress-rule destination-policy]

See http://istio.io/docs/reference for an overview of routing rules and destination policies.

Options

  1. -h, --help help for istioctl
  2. -i, --istioNamespace string Istio system namespace (default "istio-system")
  3. -c, --kubeconfig string Kubernetes configuration file (default "/home/kuat/.kube/config")
  4. --log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0)
  5. -n, --namespace string Config namespace (default "default")
  6. -p, --platform string Istio host platform (default "kube")
  7. -v, --v Level log level for V logs
  8. --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging

istioctl completion

Generate bash completion for Istioctl

Synopsis

Output shell completion code for the bash shell. The shell output must be evaluated to provide interactive completion of istioctl commands.

  1. istioctl completion [flags]

Examples

  1. # Add the following to .bash_profile.
  2. source <(istioctl completion)
  3. # Create a separate completion file and source that from .bash_profile
  4. istioctl completion > ~/.istioctl-complete.bash
  5. echo "source ~/.istioctl-complete.bash" >> ~/.bash_profile

Options

  1. -h, --help help for completion

Options inherited from parent commands

  1. -i, --istioNamespace string Istio system namespace (default "istio-system")
  2. -c, --kubeconfig string Kubernetes configuration file (default "/home/kuat/.kube/config")
  3. --log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0)
  4. -n, --namespace string Config namespace (default "default")
  5. -p, --platform string Istio host platform (default "kube")
  6. -v, --v Level log level for V logs
  7. --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging

istioctl context-create

Create a kubeconfig file suitable for use with istioctl in a non kubernetes environment

Synopsis

Create a kubeconfig file suitable for use with istioctl in a non kubernetes environment

  1. istioctl context-create --api-server http://<ip>:<port> [flags]

Examples

  1. # Create a config file for the api server.
  2. istioctl context-create --api-server http://127.0.0.1:8080

Options

  1. --api-server string URL for Istio api server
  2. --context string Kubernetes configuration file context name (default "istio")
  3. -h, --help help for context-create

Options inherited from parent commands

  1. -i, --istioNamespace string Istio system namespace (default "istio-system")
  2. -c, --kubeconfig string Kubernetes configuration file (default "/home/kuat/.kube/config")
  3. --log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0)
  4. -n, --namespace string Config namespace (default "default")
  5. -p, --platform string Istio host platform (default "kube")
  6. -v, --v Level log level for V logs
  7. --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging

istioctl create

Create policies and rules

Synopsis

Create policies and rules

  1. istioctl create [flags]

Examples

  1. istioctl create -f example-routing.yaml

Options

  1. -f, --file string Input file with the content of the configuration objects (if not set, command reads from the standard input)
  2. -h, --help help for create

Options inherited from parent commands

  1. -i, --istioNamespace string Istio system namespace (default "istio-system")
  2. -c, --kubeconfig string Kubernetes configuration file (default "/home/kuat/.kube/config")
  3. --log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0)
  4. -n, --namespace string Config namespace (default "default")
  5. -p, --platform string Istio host platform (default "kube")
  6. -v, --v Level log level for V logs
  7. --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging

istioctl delete

Delete policies or rules

Synopsis

Delete policies or rules

  1. istioctl delete <type> <name> [<name2> ... <nameN>] [flags]

Examples

  1. # Delete a rule using the definition in example-routing.yaml.
  2. istioctl delete -f example-routing.yaml
  3. # Delete the rule productpage-default
  4. istioctl delete routerule productpage-default

Options

  1. -f, --file string Input file with the content of the configuration objects (if not set, command reads from the standard input)
  2. -h, --help help for delete

Options inherited from parent commands

  1. -i, --istioNamespace string Istio system namespace (default "istio-system")
  2. -c, --kubeconfig string Kubernetes configuration file (default "/home/kuat/.kube/config")
  3. --log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0)
  4. -n, --namespace string Config namespace (default "default")
  5. -p, --platform string Istio host platform (default "kube")
  6. -v, --v Level log level for V logs
  7. --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging

istioctl get

Retrieve policies and rules

Synopsis

Retrieve policies and rules

  1. istioctl get <type> [<name>] [flags]

Examples

  1. # List all route rules
  2. istioctl get routerules
  3. # List all destination policies
  4. istioctl get destinationpolicies
  5. # Get a specific rule named productpage-default
  6. istioctl get routerule productpage-default

Options

  1. -h, --help help for get
  2. -o, --output string Output format. One of:yaml|short (default "short")

Options inherited from parent commands

  1. -i, --istioNamespace string Istio system namespace (default "istio-system")
  2. -c, --kubeconfig string Kubernetes configuration file (default "/home/kuat/.kube/config")
  3. --log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0)
  4. -n, --namespace string Config namespace (default "default")
  5. -p, --platform string Istio host platform (default "kube")
  6. -v, --v Level log level for V logs
  7. --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging

istioctl kube-inject

Inject Envoy sidecar into Kubernetes pod resources

Synopsis

Automatic Envoy sidecar injection via k8s admission controller is not ready yet. Instead, use kube-inject to manually inject Envoy sidecar into Kubernetes resource files. Unsupported resources are left unmodified so it is safe to run kube-inject over a single file that contains multiple Service, ConfigMap, Deployment, etc. definitions for a complex application. Its best to do this when the resource is initially created.

k8s.io/docs/concepts/workloads/pods/pod-overview/#pod-templates is updated for Job, DaemonSet, ReplicaSet, and Deployment YAML resource documents. Support for additional pod-based resource types can be added as necessary.

The Istio project is continually evolving so the Istio sidecar configuration may change unannounced. When in doubt re-run istioctl kube-inject on deployments to get the most up-to-date changes.

  1. istioctl kube-inject [flags]

Examples

  1. # Update resources on the fly before applying.
  2. kubectl apply -f <(istioctl kube-inject -f <resource.yaml>)
  3. # Create a persistent version of the deployment with Envoy sidecar
  4. # injected. This is particularly useful to understand what is
  5. # being injected before committing to Kubernetes API server.
  6. istioctl kube-inject -f deployment.yaml -o deployment-with-istio.yaml
  7. # Update an existing deployment.
  8. kubectl get deployment -o yaml | istioctl kube-inject -f - | kubectl apply -f -

Options

  1. --coreDump Enable/Disable core dumps in injected Envoy sidecar (--coreDump=true affects all pods in a node and should only be used the cluster admin) (default true)
  2. --debug Use debug images and settings for the sidecar (default true)
  3. -f, --filename string Input Kubernetes resource filename
  4. -h, --help help for kube-inject
  5. --hub string Docker hub (default "docker.io/istio")
  6. --imagePullPolicy string Sets the container image pull policy. Valid options are Always,IfNotPresent,Never.The default policy is IfNotPresent. (default "IfNotPresent")
  7. --includeIPRanges string Comma separated list of IP ranges in CIDR form. If set, only redirect outbound traffic to Envoy for IP ranges. Otherwise all outbound traffic is redirected
  8. --meshConfigMapName string ConfigMap name for Istio mesh configuration, key should be "mesh" (default "istio")
  9. -o, --output string Modified output Kubernetes resource filename
  10. --setVersionString string Override version info injected into resource
  11. --sidecarProxyUID int Envoy sidecar UID (default 1337)
  12. --tag string Docker tag (default "c371d111adb3da6f4edf0091716380ab97087886")
  13. --verbosity int Runtime verbosity (default 2)

Options inherited from parent commands

  1. -i, --istioNamespace string Istio system namespace (default "istio-system")
  2. -c, --kubeconfig string Kubernetes configuration file (default "/home/kuat/.kube/config")
  3. --log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0)
  4. -n, --namespace string Config namespace (default "default")
  5. -p, --platform string Istio host platform (default "kube")
  6. -v, --v Level log level for V logs
  7. --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging

istioctl register

Registers a service instance (e.g. VM) joining the mesh

Synopsis

Registers a service instance (e.g. VM) joining the mesh

  1. istioctl register <svcname> <ip> [name1:]port1 [name2:]port2 ... [flags]

Options

  1. -a, --annotations stringSlice List of string annotations to apply if creating a service/endpoint; e.g. -a foo=bar,test,x=y
  2. -h, --help help for register
  3. -l, --labels stringSlice List of labels to apply if creating a service/endpoint; e.g. -l env=prod,vers=2
  4. -s, --serviceaccount string Service account to link to the service (default "default")

Options inherited from parent commands

  1. -i, --istioNamespace string Istio system namespace (default "istio-system")
  2. -c, --kubeconfig string Kubernetes configuration file (default "/home/kuat/.kube/config")
  3. --log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0)
  4. -n, --namespace string Config namespace (default "default")
  5. -p, --platform string Istio host platform (default "kube")
  6. -v, --v Level log level for V logs
  7. --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging

istioctl replace

Replace existing policies and rules

Synopsis

Replace existing policies and rules

  1. istioctl replace [flags]

Examples

  1. istioctl replace -f example-routing.yaml

Options

  1. -f, --file string Input file with the content of the configuration objects (if not set, command reads from the standard input)
  2. -h, --help help for replace

Options inherited from parent commands

  1. -i, --istioNamespace string Istio system namespace (default "istio-system")
  2. -c, --kubeconfig string Kubernetes configuration file (default "/home/kuat/.kube/config")
  3. --log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0)
  4. -n, --namespace string Config namespace (default "default")
  5. -p, --platform string Istio host platform (default "kube")
  6. -v, --v Level log level for V logs
  7. --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging

istioctl version

Display version information

Synopsis

Display version information

  1. istioctl version [flags]

Options

  1. -h, --help help for version

Options inherited from parent commands

  1. -i, --istioNamespace string Istio system namespace (default "istio-system")
  2. -c, --kubeconfig string Kubernetes configuration file (default "/home/kuat/.kube/config")
  3. --log_backtrace_at traceLocation when logging hits line file:N, emit a stack trace (default :0)
  4. -n, --namespace string Config namespace (default "default")
  5. -p, --platform string Istio host platform (default "kube")
  6. -v, --v Level log level for V logs
  7. --vmodule moduleSpec comma-separated list of pattern=N settings for file-filtered logging