How to add kube-config and use go-client in our go program

162 views Asked by At

What the role of kube-Config and how to use this in our go program for simple operations?

1

There are 1 answers

0
Oleg Butuzov On

There is an example in client-go library you can use for learning. You can check the source, i am not including it here, as it a bit heavy.

But in general:

  • You read config from kubeconfig using kubernetes.NewForConfig
  • And using clientset returned by the previous command your app performing API requests.