Skip to main content
Skip table of contents

SSH and Ansible

SSH Fallback

In some cases the Kubernetes API is not available for the cluster. In those cases you can collect node level information using SSH access to the diagnosed nodes. Be aware that not all clusters have SSH access configured. If they do not then access using SSH fallback is not possible.

To get node level information from your cluster using SSH access, perform the following steps:

  1. Enter the following command:

CODE
dkp diagnose ssh <path/to/ansible-inventory.yaml>

The ansible-inventory.yaml file specifies the nodes to access for data collection.

This collector does not use the full Ansible inventory.yaml format only a limited subset to describe the infrastructure.

Only the following attributes of the ansible-inventory.yaml are supported. All other group definitions are ignored.

  • Support for all shared variables.

  • Support for hosts key in all groups.

  • Supported behavioral inventory is limited to:

    • ansible_host

    • ansible_port

    • ansible_user

    • ansible_ssh_private_key_file

    The following is an example inventory.yaml file:

CODE
all:
  vars:
    ansible_user: centos
  hosts:
    host-1:
      ansible_host: 192.168.10.1
    host-2:
      ansible_host: 192.168.10.22
      ansible_port: 2222

More information on these Ansible parameters can be found in the Ansible user guide.

All other group definitions in the inventory.yaml file are ignored.

Refer to the following example file:

CODE
all:
  vars:
    ansible_user: centos
  hosts:
    host-1:
      ansible_host: 192.168.10.1
    host-2:
      ansible_host: 192.168.10.22
      ansible_port: 2222

The fallback collector runs a bash script over SSH and copies the collected data. The format of the created bundle matches that of dkp diagnose collector generated bundles.

CODE
    node-diagnostics/<HOSTNAME_PORT>/data/
        - dmesg
        - ....

Redactors are supported and are in the same format as the main dkp diagnose command. Per node collection timeouts are supported using the --timeout parameter.

See also: dkp-cli

Next Topic

Custom Collectors

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.