Welcome to the Linux Foundation Forum!

question bout lab 5.1 (grep values)

in lab 5.1 - Exercise 2.1 the examples grep for a "client-cert" but i dont have that in my .kube/config. but theres a "certificate-authority-data" is that the same.
and also in Exercise 2. theres "client-key-data" also dont have that in the config file.

kubectl works fine so i think my .kube/config ist ok.

so whats this fields they grep for and how do i get them? i am using kubernetes 1.22

any help would be greate

regards

markus

Answers

  • chrispokorni
    chrispokorni Posts: 2,308

    Hi @mmaussner,

    The .kube/config file should include a "certificate-authority-data" in the clusters stanza towards the top, "client-certificate-data" and "client-key-data" in the users stanza towards the bottom. Grepping for "client-cert" sub-string of the "client-certificate-data" string should match the desired line.

    The content of the .kube/config file may look different if other cluster bootstrapping tools are used instead of kubeadm, and you may find the desired certificates and keys stored in individual files rather than the .kube/config file itself. What method did you use to bootstrap the cluster?

    What outputs do you get by echo-ing $client, $key, and $auth after the three exports?

    Regards,
    -Chris

Categories

Upcoming Training