Converting Kubernetes resource type to primitive data types

4/20/2020
func GetK8sDeploymentMetadata(clustername string, namespace string)([]v1.Deployment, error) {
    deploymentMetadata, err:=clientset[clustername].AppsV1().Deployments(namespace).List(v1.ListOptions{})
    return deploymentMetadata.Items , err  
}

I have a function which returns metadata of deployment of type []v1.Deployment .My question is how can i convert []v1.Deployment to []string

-- Pattapu Sai
go
kubernetes
kubernetes-go-client

0 Answers