what is the difference between client-go and controller-runtime?

2,689 views
Skip to first unread message

wang dong

unread,
Feb 4, 2020, 7:00:30 AM2/4/20
to kubebuilder
controller-runtime is used for controller.
But client-go can also be used to write controller.
I'm not so familiar with controller-runtime. It seems this project wraps the client-go.
But client-go is more directly for communicating with cluster.

So I am confused. Please enlighten me. thanks.

Camila Macedo

unread,
Feb 4, 2020, 10:24:12 AM2/4/20
to wang dong, kubebuilder
Hi @Wang, 

They are different projects with different responsibilities and purposes. See that controller-runtime[1] is regarded to the controllers used in the operators[2]. 
And then, the client[3] is over then actions to CRUD the resources. The controller-runtime indeed provide a client which allow us to use it in the controllers to do the CRUDs. 

PS.: If Operator does not make sense for you then, you may would you like to check the Operator-SDK[4] and/or Kubebuilder[5] project as well to have a further understanding. 


I hope that it helps you. 


CAMILA MACEDO

SR. SOFTWARE ENGINEER 

RED HAT Operator framework

Red Hat UK

IM: cmacedo





--
You received this message because you are subscribed to the Google Groups "kubebuilder" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kubebuilder...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kubebuilder/9565c4aa-ee95-418b-9129-340d837b0cfc%40googlegroups.com.

song...@gmail.com

unread,
Mar 22, 2020, 10:42:54 AM3/22/20
to kubebuilder
My understanding is the "controller" is a kind of k8s client to watch the changes from k8s, so controller-runtime wraps the client-go a lot.
Reply all
Reply to author
Forward
0 new messages