Skip to content
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
1 change: 0 additions & 1 deletion calico/operations/calicoctl/configure/etcd.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ calicoctl is still required for the following subcommands:

- [calicoctl node](../../../reference/calicoctl/node/index.mdx)
- [calicoctl ipam](../../../reference/calicoctl/ipam/index.mdx)
- [calicoctl convert](../../../reference/calicoctl/convert.mdx)
- [calicoctl version](../../../reference/calicoctl/version.mdx)

calicoctl is also required for non-Kubernetes platforms such as OpenStack.
Expand Down
1 change: 0 additions & 1 deletion calico/operations/calicoctl/configure/kdd.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ calicoctl is still required for the following subcommands:

- [calicoctl node](../../../reference/calicoctl/node/index.mdx)
- [calicoctl ipam](../../../reference/calicoctl/ipam/index.mdx)
- [calicoctl convert](../../../reference/calicoctl/convert.mdx)
- [calicoctl version](../../../reference/calicoctl/version.mdx)

### Default configuration
Expand Down
1 change: 0 additions & 1 deletion calico/operations/calicoctl/configure/overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ calicoctl is still required for the following subcommands:

- [calicoctl node](../../../reference/calicoctl/node/index.mdx)
- [calicoctl ipam](../../../reference/calicoctl/ipam/index.mdx)
- [calicoctl convert](../../../reference/calicoctl/convert.mdx)
- [calicoctl version](../../../reference/calicoctl/version.mdx)

calicoctl is also required for non-Kubernetes platforms such as OpenStack.
Expand Down
1 change: 0 additions & 1 deletion calico/operations/install-apiserver.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ calicoctl is still required for the following subcommands:

- [calicoctl node](../reference/calicoctl/node/index.mdx)
- [calicoctl ipam](../reference/calicoctl/ipam/index.mdx)
- [calicoctl convert](../reference/calicoctl/convert.mdx)
- [calicoctl version](../reference/calicoctl/version.mdx)

## How to
Expand Down
1 change: 0 additions & 1 deletion calico/operations/native-v3-crds.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,6 @@ When using native `projectcalico.org/v3` CRDs, tier RBAC is enforced via the adm

- [calicoctl node](../reference/calicoctl/node/index.mdx) subcommands
- [calicoctl ipam](../reference/calicoctl/ipam/index.mdx) subcommands
- [calicoctl convert](../reference/calicoctl/convert.mdx)
- [calicoctl version](../reference/calicoctl/version.mdx)

## Known limitations
Expand Down
92 changes: 23 additions & 69 deletions calico/reference/calicoctl/apply.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -25,74 +25,33 @@ Run `calicoctl apply --help` to display the following help menu for the
command.

```
Create or update one or more Calico resources from a file, directory, or stdin,
in YAML or JSON format. Apply adds resources that don't exist yet and updates
those that do, so it's the right choice when you don't care whether the resource
is already present.

Usage:
calicoctl apply --filename=<FILENAME> [--recursive] [--skip-empty] [--config=<CONFIG>] [--namespace=<NS>]
calicoctl apply [flags]

Examples:
# Apply a policy using the data in policy.yaml.
# Apply resources from a file.
calicoctl apply -f ./policy.yaml

# Apply a policy based on the JSON passed into stdin.
# Apply resources from stdin.
cat policy.json | calicoctl apply -f -

Options:
-h --help Show this screen.
-f --filename=<FILENAME> Filename to use to apply the resource. If set to
"-" loads from stdin. If filename is a directory, this command is
invoked for each .json .yaml and .yml file within that directory,
terminating after the first failure.
-R --recursive Process the filename specified in -f or --filename recursively.
--skip-empty Do not error if any files or directory specified using -f or --filename contain no
data.
-c --config=<CONFIG> Path to the file containing connection
configuration in YAML or JSON format.
[default: /etc/calico/calicoctl.cfg]
-n --namespace=<NS> Namespace of the resource.
Only applicable to NetworkPolicy and WorkloadEndpoint.
Only applicable to NetworkPolicy, NetworkSet, and WorkloadEndpoint.
Uses the default namespace if not specified.
--context=<context> The name of the kubeconfig context to use.

Description:
The apply command is used to create or replace a set of resources by filename
or stdin. JSON and YAML formats are accepted.

Valid resource types are:

- bgpconfiguration
- bgpfilter
- bgppeer
- clusterinformation
- felixconfiguration
- globalnetworkpolicy
- globalnetworkset
- hostendpoint
- ippool
- ipreservation
- kubecontrollersconfiguration
- networkpolicy
- networkset
- node
- profile
- tier
- workloadendpoint

When applying a resource:
- if the resource does not already exist (as determined by it's primary
identifiers) then it is created
- if the resource already exists then the specification for that resource is
replaced in it's entirety by the new resource specification.

The output of the command indicates how many resources were successfully
applied, and the error reason if an error occurred.

The resources are applied in the order they are specified. In the event of a
failure applying a specific resource it is possible to work out which
resource failed based on the number of resources successfully applied

When applying a resource to perform an update, the complete resource spec
must be provided, it is not sufficient to supply only the fields that are
being updated.
Flags:
-c, --config string Path to the file containing connection configuration in YAML or JSON format. (default "/etc/calico/calicoctl.cfg")
-f, --filename string Filename to use to create/apply/replace/delete the resource. Use '-' for stdin.
-h, --help help for apply
-n, --namespace string Namespace of the resource.
-R, --recursive Process the filename specified in -f recursively.
--skip-empty Do not error if files contain no data.

Global Flags:
--allow-version-mismatch Allow client and cluster versions mismatch
--context string The name of the kubeconfig context to use
-l, --log-level string Set the log level (panic, fatal, error, warn, info, debug) (default "panic")
```

### Examples
Expand Down Expand Up @@ -124,19 +83,14 @@ Description:
### Options

```
-f --filename=<FILENAME> Filename to use to apply the resource. If set to
"-" loads from stdin.
-n --namespace=<NS> Namespace of the resource.
Only applicable to NetworkPolicy and WorkloadEndpoint.
Uses the default namespace if not specified.
-f, --filename string Filename to use to create/apply/replace/delete the resource. Use '-' for stdin.
-n, --namespace string Namespace of the resource.
```

### General options

```
-c --config=<CONFIG> Path to the file containing connection
configuration in YAML or JSON format.
[default: /etc/calico/calicoctl.cfg]
-c, --config string Path to the file containing connection configuration in YAML or JSON format. (default "/etc/calico/calicoctl.cfg")
```

## See also
Expand Down
53 changes: 21 additions & 32 deletions calico/reference/calicoctl/cluster/diags.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -18,37 +18,29 @@ Run `calicoctl cluster diags --help` to display the following help menu for the
command.

```
Usage:
calicoctl cluster diags [options]

Options:
-h --help Show this screen.
--since=<SINCE> Only collect logs newer than provided relative
duration, in seconds (s), minutes (m) or hours (h).
--max-logs=<MAXLOGS> Only collect up to this number of logs, for each
kind of Calico component. [default: 5]
--focus-nodes=<NODES> Comma-separated list of nodes from which we should
try first to collect logs.
-c --config=<CONFIG> Path to connection configuration file.
[default: /etc/calico/calicoctl.cfg]
Collect a snapshot of cluster-wide Calico diagnostics and logs. Unlike node
diags, which runs on a single host, this gathers information across the
cluster.

Description:
The cluster diags command collects a snapshot of diagnostic info and logs related
to Calico for the given cluster. It generates a .tar.gz file containing all the
diags.
Usage:
calicoctl cluster diags [flags]

By default, to keep the .tar.gz file to a reasonable size, this command
only collects up to 5 sets of logs for each kind of Calico pod (for example,
for calico-node, or Typha, or the intrusion detection controller). To collect
more (or fewer) sets of logs, use the --max-logs option.
Examples:
calicoctl cluster diags

To tell calicoctl to try to collect logs first from particular nodes of interest,
set the --focus-nodes option to the relevant node names, comma-separated. For a
Calico component with pods on multiple nodes, calicoctl will first collect logs
from the pods (if any) on the focus nodes, then from other nodes in the cluster.
Flags:
-c, --config string Path to the file containing connection configuration in YAML or JSON format. (default "/etc/calico/calicoctl.cfg")
--focus-nodes string Comma-separated list of nodes from which to try first to collect logs.
-h, --help help for diags
--max-logs int Only collect up to this number of logs, for each kind of Calico component. (default 5)
--max-parallelism int Maximum number of parallel threads to use for collecting logs. (default 10)
--since string Only collect logs newer than provided relative duration (e.g. 30m, 2h).
--skip-temp-dir-cleanup Don't clean up the temporary directory.

To collect logs only for the last few hours, minutes, or seconds, set the --since
option to indicate the desired period.
Global Flags:
--allow-version-mismatch Allow client and cluster versions mismatch
--context string The name of the kubeconfig context to use
-l, --log-level string Set the log level (panic, fatal, error, warn, info, debug) (default "panic")
```

### Examples
Expand Down Expand Up @@ -365,9 +357,6 @@ Diagnostic bundle available at ./calico-diagnostics.tar.gz
### Options

```
--since=<SINCE> Only collect logs newer than provided relative duration,
in seconds (s), minutes (m) or hours (h)
-c --config=<CONFIG> Path to the file containing connection configuration in
YAML or JSON format.
[default: /etc/calico/calicoctl.cfg]
--since string Only collect logs newer than provided relative duration (e.g. 30m, 2h).
-c, --config string Path to the file containing connection configuration in YAML or JSON format. (default "/etc/calico/calicoctl.cfg")
```
19 changes: 12 additions & 7 deletions calico/reference/calicoctl/cluster/overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,23 @@ Run `calicoctl cluster --help` to display the following help menu for the
commands.

```
Access cluster-wide Calico information.

Usage:
calicoctl cluster <command> [<args>...]
calicoctl cluster [command]

diags Collect snapshot of diagnostic info and logs related to Calico at the cluster-level.
Available Commands:
diags Collect snapshot of diagnostic info and logs related to Calico at the cluster-level

Options:
-h --help Show this screen.
Flags:
-h, --help help for cluster

Description:
Commands for accessing Cluster related information.
Global Flags:
--allow-version-mismatch Allow client and cluster versions mismatch
--context string The name of the kubeconfig context to use
-l, --log-level string Set the log level (panic, fatal, error, warn, info, debug) (default "panic")

See 'calicoctl cluster <command> --help' to read about a specific subcommand.
Use "calicoctl cluster [command] --help" for more information about a command.
```

## Cluster specific commands
Expand Down
96 changes: 0 additions & 96 deletions calico/reference/calicoctl/convert.mdx

This file was deleted.

Loading