Search code examples
kubernetescontainersdaemonset

kubernetes get values from already deployed pod/daemonset


someone before me deployed daemonset, and configmap is it possible for me to somehow get the values he used ? smth like kubectl edit <name> but the edit option has some temporary data in it too - the name of pod with random chars etc. - and to get pure values used in that deployments/daemonset what command would I need to use?


Solution

  • kubectl get --export had bugs like this and this and --export will be deprecated in k8s v1.18 per this link.

    $ kubectl get --export
    Flag --export has been deprecated, This flag is deprecated and will be removed in future.
    ...
    

    kubectl get -o yaml can be used to get values of a k8s resource's manifest along with metadata and status of the resource. kubectl get -o yaml has the following three sections:

    • metadata
    • spec with the values of the k8s resource's manifest
    • status with the resource's status