func (c *client) SetAnnotationsOnPod(pod *kapi.Pod, annotations map[string]string) error {
	log.Debug().Msgf("Setting annotation on pod, namespace: %s, podName: %s, annotations: %v",
		pod.Namespace, pod.Name, annotations)
	var err error
	var patchData []byte
	patch := struct {
		Metadata map[string]interface{} `json:"metadata"`
	}{
		Metadata: map[string]interface{}{
			"annotations": annotations,
		},
	}
	podDesc := pod.Namespace + "/" + pod.Name
	patchData, err = json.Marshal(&patch)
	if err != nil {
		return fmt.Errorf("failed to set annotations on pod %s: %v", podDesc, err)
	}
	return c.PatchPod(pod, types.MergePatchType, patchData)
}
SetAnnotationsOnPod takes the pod object and map of key/value string pairs to set as annotations
package k8sclient
import (
	"context"
	"encoding/json"
	"fmt"
	netapi "github.com/k8snetworkplumbingwg/network-attachment-definition-client/pkg/apis/k8s.cni.cncf.io/v1"
	netclient "github.com/k8snetworkplumbingwg/network-attachment-definition-client/pkg/client/clientset/versioned/typed/k8s.cni.cncf.io/v1"  
	"github.com/rs/zerolog/log"
	kapi "k8s.io/api/core/v1"
	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
	"k8s.io/apimachinery/pkg/types"
	"k8s.io/client-go/kubernetes"
	"k8s.io/client-go/rest"
	"sigs.k8s.io/controller-runtime/pkg/client/config"
)
type Client interface {
	GetPods(namespace string) (*kapi.PodList, error)
	SetAnnotationsOnPod(pod *kapi.Pod, annotations map[string]string) error
	PatchPod(pod *kapi.Pod, patchType types.PatchType, patchData []byte) error
	GetNetworkAttachmentDefinition(namespace, name string) (*netapi.NetworkAttachmentDefinition, error)
	GetRestClient() rest.Interface
}
type client struct {
	clientset kubernetes.Interface
	netClient netclient.K8sCniCncfIoV1Interface
}
func NewK8sClient() (Client, error) {
	log.Debug().Msg("Setting up kubernetes client")
	conf, err := config.GetConfig()
	if err != nil {
		return nil, fmt.Errorf("unable to set up client config error %v", err)
	}
	clientset, err := kubernetes.NewForConfig(conf)
	if err != nil {
		return nil, fmt.Errorf("unable to create a kubernetes client error %v", err)
	}
	netClient, err := netclient.NewForConfig(conf)
	if err != nil {
		return nil, fmt.Errorf("unable to create a network attachment client: %v", err)
	}
	return &client{clientset: clientset, netClient: netClient}, nil
}
func (c *client) GetPods(namespace string) (*kapi.PodList, error) {
	log.Debug().Msgf("getting pods in namespace %s", namespace)
	return c.clientset.CoreV1().Pods(namespace).List(context.TODO(), metav1.ListOptions{})
}