Skip to main content
Glama
connect.go1.05 kB
package example import ( "os" "path/filepath" "github.com/weibaohui/kom/callbacks" "github.com/weibaohui/kom/kom" "k8s.io/client-go/util/homedir" ) func Connect() { callbacks.RegisterInit() defaultKubeConfig := os.Getenv("KUBECONFIG") if defaultKubeConfig == "" { defaultKubeConfig = filepath.Join(homedir.HomeDir(), ".kube", "config") } // 配置 EKS 集群信息 // config := aws.EKSAuthConfig{ // AccessKey: "XXX", // AWS Access Key ID // SecretAccessKey: "yyy", // AWS Secret Access Key // Region: "us-east-1", // AWS 区域 // ClusterName: "k8m", // EKS 集群名称 // } // // _, _ = kom.Clusters().RegisterAWSCluster(config) _, _ = kom.Clusters().RegisterByPathWithID(defaultKubeConfig, "default") // _, _ = kom.Clusters().RegisterByPathWithID(defaultKubeConfig, "default", kom.RegisterProxyURL("http://localhost:7890"), kom.RegisterDisableCRDWatch(), kom.RegisterBurst(400)) kom.Clusters().Show() }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/weibaohui/kom'

If you have feedback or need assistance with the MCP directory API, please join our Discord server