client-go开发自定义operator
作者:互联网
开发operator一共分为5步骤
一、创建config
config的创建有两种方式
1、clientcmd.BuildConfigFromFlags
config, err := clientcmd.BuildConfigFromFlags("", clientcmd.RecommendedHomeFile) if err != nil { //访问集群内 inClusterConfig, err := rest.InClusterConfig() if err != nil { log.Fatalln("can't get config") } config = inClusterConfig }
标签:inClusterConfig,自定义,err,nil,clientcmd,operator,go,config 来源: https://www.cnblogs.com/wuchangblog/p/16661637.html