开发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 }
标签:自定义,err,clientcmd,operator,go,config From: https://www.cnblogs.com/wuchangblog/p/16661637.html