move2kube icon indicating copy to clipboard operation
move2kube copied to clipboard

Duplicate entires v1 for Node, Pod, NetworkPolicy, etc. when collecting cluster metadata.

Open HarikrishnanBalagopal opened this issue 5 years ago • 1 comments

Steps to reproduce

Note: This bug only occurs when collecting use the CLI. By default it will use the CLI only if the API fails.

  1. move2kube collect -a k8s

Expected behaviour

Cluster metadata yaml should have:

Node:
  - v1

Actual behaviour

Cluster metadata yaml has:

Node:
  - v1
  - v1

This also happens with Pod and NetworkPolicy.

This is an old bug that was never fixed.

Proposed Fix

The code that parses the CLI output needs to be looked at closely. kubectl returns human readable output, so the parsing code is fragile.

HarikrishnanBalagopal avatar Nov 09 '20 15:11 HarikrishnanBalagopal

This might be helpful: https://kubernetes.io/docs/reference/kubectl/overview/#operations https://www.mankier.com/1/kubectl-cluster-info-dump It outputs a lot of information and the format can be chosen (json, yaml, etc.).

HarikrishnanBalagopal avatar Mar 13 '21 09:03 HarikrishnanBalagopal