Use protobuf encoding for core K8s apis#676
Conversation
|
From: https://kubernetes.io/docs/reference/using-api/api-concepts/#alternate-representations-of-resources:
Does it work for CRDs that we have? |
Right, it doesn't work for CRDs. |
For core K8s API objects like Pods, Nodes, etc., we can use protobuf encoding which reduces CPU consumption related to (de)serialization, reduces overall latency of the API call, reduces memory footprint, reduces the amount of work performed by the GC and results in quicker propagation of objects to event handlers of shared informers. Signed-off-by: Nikhil-Ladha <nikhilladha1999@gmail.com>
cd1bb4d to
1383412
Compare
|
Updated it to add the protobuf encoding only for CLI tool interactions after testing, in other places we have use the client to interact with CRDs. |
For core K8s API objects like Pods, Nodes, etc., we can use protobuf encoding which reduces CPU consumption related to (de)serialization, reduces overall latency of the API call, reduces memory footprint, reduces the amount of work performed by the GC and results in quicker propagation of objects to event handlers of shared informers.