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