func NewPodExecutor() (*PodExecutor, error) {
	kubeconfig := clientcmd.NewNonInteractiveDeferredLoadingClientConfig(
		clientcmd.NewDefaultClientConfigLoadingRules(),
		&clientcmd.ConfigOverrides{},
	)
	config, err := kubeconfig.ClientConfig()
	if err != nil {
		return nil, err
	}
	client, err := corev1client.NewForConfig(config)
	if err != nil {
		return nil, err
	}
	return &PodExecutor{
		client: client,
		config: config,
	}, nil
}
NewPodExecutor return a pointer to PodExecutor.
package internal
import (
	"io"
	corev1 "k8s.io/api/core/v1"
	"k8s.io/client-go/kubernetes/scheme"
	corev1client "k8s.io/client-go/kubernetes/typed/core/v1"
	"k8s.io/client-go/rest"
	"k8s.io/client-go/tools/clientcmd"
	"k8s.io/client-go/tools/remotecommand"
)
type PodExecutor struct {
	client corev1client.CoreV1Interface
	config *rest.Config
}