| | |
| | | package main |
| | | package create |
| | | |
| | | import ( |
| | | "context" |
| | |
| | | package main |
| | | package delete |
| | | |
| | | import ( |
| | | "context" |
| | |
| | | "../delete" |
| | | "k8s.io/client-go/kubernetes" |
| | | "k8s.io/client-go/tools/clientcmd" |
| | | |
| | | "basic.com/aps/aps_deploy.git/src/create" |
| | | "basic.com/aps/aps_deploy.git/src/delete" |
| | | "basic.com/aps/aps_deploy.git/src/util" |
| | | ) |
| | | |
| | | var ( |
| | |
| | | } |
| | | |
| | | // 配置 Kubernetes 集群的 kubeconfig 路径 |
| | | kubeconfig := flag.String("kubeconfig", filepath.Join(homeDir(), ".kube", "config"), "kubeconfig file") |
| | | kubeconfig := flag.String("kubeconfig", filepath.Join(util.homeDir(), ".kube", "config"), "kubeconfig file") |
| | | flag.Parse() |
| | | |
| | | // 创建 Kubernetes 客户端 |