> [!CAUTION]
> You are currently viewing version 1.2 of the Apigee hybrid documentation. **This version is end of life.** You should upgrade to a newer version. For more information, see [Supported versions](https://docs.cloud.google.com/apigee/docs/hybrid/supported-platforms.md.txt#supported-versions).

<button class="button button-with-icon cloud-select-dropdown__button button-primary" aria-haspopup="true">Version 1.2 (unsupported)</button>

- Supported versions:
- [v1.17 (latest)](https://docs.cloud.google.com/apigee/docs/hybrid/v1.17/cli-reference.md.txt)
- [v1.16](https://docs.cloud.google.com/apigee/docs/hybrid/v1.16/cli-reference.md.txt)
- [v1.15](https://docs.cloud.google.com/apigee/docs/hybrid/v1.15/cli-reference.md.txt)
- [v1.14](https://docs.cloud.google.com/apigee/docs/hybrid/v1.14/cli-reference.md.txt)
- [List of supported versions](https://docs.cloud.google.com/apigee/docs/hybrid/supported-platforms.md.txt#supported-versions)
- Unsupported versions:
- [v1.13](https://docs.cloud.google.com/apigee/docs/hybrid/v1.13/cli-reference.md.txt)
- [v1.12](https://docs.cloud.google.com/apigee/docs/hybrid/v1.12/cli-reference.md.txt)
- [v1.11](https://docs.cloud.google.com/apigee/docs/hybrid/v1.11/cli-reference.md.txt)
- [v1.10](https://docs.cloud.google.com/apigee/docs/hybrid/v1.10/cli-reference.md.txt)
- [v1.9](https://docs.cloud.google.com/apigee/docs/hybrid/v1.9/cli-reference.md.txt)
- [v1.8](https://docs.cloud.google.com/apigee/docs/hybrid/v1.8/cli-reference.md.txt)
- [v1.7](https://docs.cloud.google.com/apigee/docs/hybrid/v1.7/cli-reference.md.txt)
- [v1.6](https://docs.cloud.google.com/apigee/docs/hybrid/v1.6/cli-reference.md.txt)
- [v1.5](https://docs.cloud.google.com/apigee/docs/hybrid/v1.5/cli-reference.md.txt)
- [v1.4](https://docs.cloud.google.com/apigee/docs/hybrid/v1.4/cli-reference.md.txt)
- [v1.3](https://docs.cloud.google.com/apigee/docs/hybrid/v1.3/cli-reference.md.txt)
- [v1.2](https://docs.cloud.google.com/apigee/docs/hybrid/v1.2/cli-reference.md.txt)
- [v1.1](https://docs.cloud.google.com/apigee/docs/hybrid/v1.1/cli-reference.html)


`apigeectl` is a command-line interface (CLI)
for installing and managing Apigee hybrid in a Kubernetes cluster.
For
information on downloading and installing `apigeectl`, see
[Download and install apigeectl](https://docs.cloud.google.com/apigee/docs/hybrid/v1.2/install-download-install.md.txt#download-and-install-apigeectl).

> [!NOTE]
> **NOTE:** You must have [`kubectl`](https://kubernetes.io/docs/reference/kubectl/overview/) installed and set up on your Kubernetes administration machine to use the `apigeectl` command.

## apigeectl syntax

```
apigeectl [command] [flags]
```

Where:

- <var translate="no">command</var>: Specifies the operation you want to
  perform. For a complete list of commands, see [apigeectl commands](https://docs.cloud.google.com/apigee/docs/hybrid/v1.2/cli-reference.md.txt#commands).

- <var translate="no">flags</var>: Specifies command
  parameters. For a complete list of flags, see [apigeectl flags](https://docs.cloud.google.com/apigee/docs/hybrid/v1.2/cli-reference.md.txt#options).

## apigeectl commands

The following table lists the `apigeectl` commands:

| Command | Description |
|---|---|
| `apply` | Applies configurations for Apigee hybrid [runtime](https://docs.cloud.google.com/apigee/docs/hybrid/v1.2/service-config.md.txt) components to your Kubenetes cluster. Use the `-c` flag to specify one or more (comma-separated) components. If you do not specify the `-c` flag, then the `apply` command applies all of the components to the cluster. > [!NOTE] > **NOTE:** You must call `apigeectl init` before calling `apigeectl apply`. |
| `check‑ready` | Checks the status of the hybrid component pods. When all component pods are ready, the message "All containers ready" is output. For automated scripting, note that the command exits with a status of 0 when the containers are all ready. When there is at least one pod not ready, the command exits with a status of 1. If you do not specify the `-c` flag, then the `check-ready` command applies to all components in the cluster. |
| `delete` | Deletes hybrid components from the cluster. Use the `--all` flag to remove ALL of the components. If you omit `--all`, only the Apigee-specific components are removed (the components installed with `apigeectl init` are not deleted). Apigee-specific components are the components that are installed with the `apply` command. If you do not specify the `-c` flag, then the `delete` command applies to all of the components deployed in the cluster. |
| `help` | Prints online help. |
| `init` | Applies configurations for prerequisite components, such as Istio and Apigee Deployment, to the cluster. Use the `-c` flag to specify one or more (comma-separated) components. |
| `version` | Prints the CLI version information. |

## apigeectl flags

The following table lists the `apigeectl` flags:

| Flag | Description |
|---|---|
| `-c, --components` | Specifies a single component to which the command applies. If you do not specify this flag, then the command applies to all components (the entire deployment) in the cluster. Possible values include: - `cassandra` - `logger` - `mart` - `metrics` - `runtime` - `synchronizer` - `udca` For example, `-c cassandra` Or, to specify multiple components add comma-separated values: `-c cassandra, runtime` |
| `--dry-run` | Executes the specified command without changing the cluster. Use with `‑‑print-yaml` to output the rendered object spec to a file. |
| `‑f, ‑‑file‑override‑config` | Specifies a YAML file containing custom configuration properties for the hybrid deployment. The default value is `./overrides.yaml`. An overrides file is required for the `apply`, `check-ready`, `delete`, and `init` commands. You must specify the full path with this flag. For more information, see [Managing runtime plane components](https://docs.cloud.google.com/apigee/docs/hybrid/v1.2/customize-services.md.txt). |
| `-h, --help` | Displays help for the command. |
| `--print-yaml` | Prints the configuration template output to stdout. For an example that uses this flag, see [Print the configuration to a file](https://docs.cloud.google.com/apigee/docs/hybrid/v1.2/cli-reference.md.txt#print). |
| `-s, --settings` | Specifies a configuration to which the command applies. Currently, this flag is only supported for the `virtualhosts` configuration, which is part of the `runtime` component. Use this flag if you make changes to the `virtualhosts` property, and nothing else. (Added v1.2.0) For example, if you make a change to the `virtualhosts` configuration in your overrides file, apply it to the cluster with this command: ``` apigeectl apply -f my-overrides.yaml --settings virtualhosts -c runtime ``` |

> [!IMPORTANT]
> The `apigeectl` command uses `kubectl` behind the scenes to do
> its work. The `apigeectl` command options (`apply` and `delete`,
> and the use of YAML configuration files, are similar to their kubectl counterparts.
> To learn more about how objects are managed in a Kubernetes cluster, see the following topics:
>
> - [Imperative Management of Kubernetes Objects Using Configuration Files](https://kubernetes.io/docs/tasks/manage-kubernetes-objects/imperative-config/)
> - [Overview of kubectl](https://kubernetes.io/docs/reference/kubectl/overview/)

## Examples

### Initialize the cluster configuration


Apply prerequisite component configurations to your cluster with `init`.
You must run the `init`
command before `apply`.

```
apigeectl init -f my_overrides.yaml
```

### Apply the cluster configuration

To apply hybrid configurations to your Kubernetes cluster, use the
`apply` command. The first time you run `apply` all of the
hybrid runtime components are created in your cluster. If you make configuration changes, rerun
`apply` to apply only the changes or use `-c` to apply a specific
component only.

The following example applies the configuration for hybrid runtime plane
components to your cluster:

```
apigeectl apply -f my_overrides.yaml
```

### Apply the configuration for a single component

To restrict the `apply` command to a particular component, use the
`-c` flag, as described in
[apigeectl flags](https://docs.cloud.google.com/apigee/docs/hybrid/v1.2/cli-reference.md.txt#options).

The following example only applies the configuration for the Synchronizer
component:

```
apigeectl apply -c synchronizer -f my_overrides.yaml
```

The following example only applies the configuration for the Cassandra and runtime
components:

```
apigeectl apply -c cassandra,runtime -f my_overrides.yaml
```

### Print the configuration to a file

If you're debugging an installation problem, it's useful to print out the entire
cluster configuration to a file so that you can inspect the configuration
settings. The `--print-yaml` flag prints
the hybrid configuration to stdout, and the `--dry-run` flag allows the
command to run without making any changes to the cluster.

```
apigeectl apply -f my_overrides.yaml --dry-run --print-yaml > apigee-hybrid.yaml
```

> [!NOTE]
> **NOTE:** It is a good practice to save a copy of the YAML output in source control for future reference. But be aware that the output file contains passwords and secrets that you may not want to store.

### Check pod status

The following example checks the status of pods deployed to your cluster:

```
apigeectl check-ready
All containers ready in namespace 'my-namespace'
```

### Delete hybrid from the cluster

The following example deletes only the hybrid runtime components to your
Kubernetes cluster. To delete everything, use the `--all` flag.

> [!NOTE]
> **NOTE:** To uninstall successfully, you must have `kubectl` version 1.11.x or later installed.

```
apigeectl delete -f my_overrides.yaml
```