Skip to main content
Loading
Version: Operator 3.0.0

Aerospike Kubernetes Operator Command Line Tool

akoctl is a Krew plugin for the Kubernetes Operator.

Install with Krew plugin manager

  1. Install Krew.

    Follow the Krew setup instructions here.

  2. Install akoctl:

kubectl krew index add akoctl https://github.com/aerospike/aerospike-kubernetes-operator-ctl.git
kubectl krew index list
INDEX    URL
akoctl https://github.com/aerospike/aerospike-kubernetes-operator-ctl.git
default https://github.com/kubernetes-sigs/krew-index.git
kubectl krew install akoctl/akoctl
Updated the local copy of plugin index "akoctl".
Updated the local copy of plugin index.
Installing plugin: akoctl
Installed plugin: akoctl
\
| Use this plugin:
| kubectl akoctl
| Documentation:
| https://github.com/aerospike/aerospike-kubernetes-operator-ctl
/

collectinfo debug command

akoctl uses the collectinfo command to collect logs from a given namespace. collectinfo collects the following data:

  • All container logs
  • All event logs
  • Configurations of all nodes in the Kubernetes cluster
  • Configurations of Aerospike mutating and validating webhooks

It also gets an inventory of the following objects:

  • Pods
  • StatefulSets
  • PersistentVolumeClaims
  • AerospikeClusters
  • Storage classes

akoctl inherits the user's kubectl permissions. If a user cannot access a particular resource, its logs do not appear in the akoctl results.

FlagShorthandTypeDescription
all-namespaces-AboolCollect info from all namespaces present in the cluster.
namespaces-nstringComma-separated list of namespaces to collect data from.
kubeconfigstringAbsolute path to the kubeconfig file.
pathstringAbsolute path to save the output tar file.
cluster-scopeboolPermission to collect info on cluster-scoped objects. Defaults to true.

Example:

kubectl akoctl collectinfo -n aerospike,olm --path ~/sample-directory/

This creates a timestamped tar file called scraperlogs-<timestamp> and saves it in the ~/sample-directory/ directory. The directory structure appears as follows:

akoctl_collectinfo
├── akoctl.log
├── k8s_cluster
│ ├── nodes
│ │ ├── <node1 name>.yaml
│ │ └── <node2 name>.yaml
│ └── storageclasses
│ ├── <storageclass name>.yaml
│ └── mutatingwebhookconfigurations
│ ├── <mutatingwebhook name>.yaml
│ └── validatingwebhookconfigurations
│ ├── <validatingwebhook name>.yaml
└── k8s_namespaces
└── aerospike
├── aerospikeclusters
├── events
├── persistentvolumeclaims
│ ├── <pvc name>.yaml
├── pods
│ ├── <pod name>
│ │ ├── <pod name>.yaml
│ │ └── logs
│ │ ├── previous
│ │ │ └── <container name>.log
│ │ └── <container name>.log
└── statefulsets
│ ├── <sts name>.yaml