Use kubectl context in kubernetes client-go

后端 未结 1 1407
有刺的猬
有刺的猬 2021-01-19 16:21

How can I use a normal context to configure the kubernetes client-go?

    package kube

    import (
        \"fmt\"

        \"k8s.io/client-go/kubernetes\"         


        
1条回答
  •  南方客
    南方客 (楼主)
    2021-01-19 17:00

    Found the problem. The implementation of github.com/imdario/mergo changed in a newer version and breaks the actual behavior of generating the client config. So just only use revision 6633656539c1639d9d78127b7d47c622b5d7b6dc like in the official kubernetes cient-go repository.

    https://github.com/kubernetes/client-go/issues/415

    0 讨论(0)
提交回复
热议问题