wangpengfei
2023-06-02 7bcd009239c51466edfd1796e6435a84b43f0bae
src/k8s/delete.go
@@ -6,21 +6,18 @@
   "fmt"
   "path/filepath"
   "../util"
   "basic.com/aps/aps_deploy.git/src/util"
   "k8s.io/apimachinery/pkg/api/errors"
   metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
   "k8s.io/client-go/kubernetes"
   "k8s.io/client-go/tools/clientcmd"
)
var (
   replicas      int32 = 3
   port          int32 = 9081
   namespaces          = []string{"guangsheng", "geruimi", "tongsheng"}
   usedNodePorts       = make(map[int32]bool)
)
func main() {
func delete_test() {
        var (
           namespaces          = []string{"guangsheng", "geruimi", "tongsheng"}
        )
   // 配置 Kubernetes 集群的 kubeconfig 路径
   kubeconfig := flag.String("kubeconfig", filepath.Join(util.HomeDir(), ".kube", "config"), "kubeconfig file")
   flag.Parse()