This is a incomplete experimentation of creating a C++ binding of Kubernetes go client library.
Go C++ 14 protobuf
git clone https://github.com/jianhuiz/k8s-client-cpp
Note: All blocks below must be executed from the root of the repository.
cd ./go
go mod vendor
protoc -I $PWD/go/vendor --cpp_out $PWD/cpp/ \
$PWD/go/vendor/k8s.io/api/core/v1/generated.proto \
$PWD/go/vendor/k8s.io/apimachinery/pkg/api/resource/generated.proto \
$PWD/go/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto \
$PWD/go/vendor/k8s.io/apimachinery/pkg/runtime/generated.proto \
$PWD/go/vendor/k8s.io/apimachinery/pkg/runtime/schema/generated.proto \
$PWD/go/vendor/k8s.io/apimachinery/pkg/util/intstr/generated.proto
cd ./go
go build -buildmode=c-archive -o go.a
cd ./cpp
make
Change the LDFLAGS to:
LD_FLAGS = ../go/go.a -lprotobuf -lpthread -framework CoreFoundation -framework Security