Loading
Version: Operator 3.0.0Aerospike Kubernetes Operator Command Line Tool
akoctl
is a Krew plugin for the Kubernetes Operator.
Install with Krew plugin managerโ
Install Krew.
Follow the Krew setup instructions here.
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.
Flag | Shorthand | Type | Description |
---|---|---|---|
all-namespaces | -A | bool | Collect info from all namespaces present in the cluster. |
namespaces | -n | string | Comma-separated list of namespaces to collect data from. |
kubeconfig | string | Absolute path to the kubeconfig file. | |
path | string | Absolute path to save the output tar file. | |
cluster-scope | bool | Permission 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