func WipeK8sPods() {
	config, err := clientcmd.DefaultClientConfig.ClientConfig()
	if err != nil {
		panic(err)
	}
	clientset, err := kubernetes.NewForConfig(config)

	if err != nil {
		panic(err)
	}
	pods, err := clientset.Pods(K8S_TEST_NS).List(v1.ListOptions{})
	if err != nil {
		panic(err)
	}

	for _, pod := range pods.Items {
		err = clientset.Pods(K8S_TEST_NS).Delete(pod.Name, &v1.DeleteOptions{})

		if err != nil {
			panic(err)
		}
	}
}
// Delete all K8s pods from the "test" namespace
Delete all K8s pods from the "test" namespace
// Delete all K8s pods from the " test " namespace
func WipeK8sPods() {
	config, err := clientcmd.DefaultClientConfig.ClientConfig()
	if err != nil {
		panic(err)
	}
	clientset, err := kubernetes.NewForConfig(config)
	if err != nil {
		panic(err)
	}
	pods, err := clientset.Pods(K8S_TEST_NS).List(v1.ListOptions{})
	if err != nil {
		panic(err)
	}
	for _, pod := range pods.Items {
		err = clientset.Pods(K8S_TEST_NS).Delete(pod.Name, &v1.DeleteOptions{})
		if err != nil {
			panic(err)
		}
	}
}
func WipeK8sPods ( ) { config , err := clientcmd . DefaultClientConfig . ClientConfig ( ) if err != nil { panic ( err ) } clientset , err := kubernetes . NewForConfig ( config ) if err != nil { panic ( err ) } pods , err := clientset . Pods ( K8S_TEST_NS ) . List ( v1 . ListOptions { } ) if err != nil { panic ( err ) } for _ , pod := range pods . Items { err = clientset . Pods ( K8S_TEST_NS ) . Delete ( pod . Name , & v1 . DeleteOptions { } ) if err != nil { panic ( err ) } } }
Delete all K8s pods from the "test" namespace
Delete all K8s pods from the " test " namespace