Deploy service to Kubernetes via Go

2/18/2020

I am trying to write a Go script which will deploy given deployment to K8S cluster. Ideally, I would like the script to do something like this bash:

KUBECONFIG="/kubeconfig" kubectl rollout restart --namespace $k8s_namespace "deployment/${service_name}"

I have been looking into the Kubernetes implementation in GitHub and the client-go code but so far the only Go APIs I found is how to create deployments like stated here But instead I want to be able to reference an existing deployment in given k8s namespace and do rollout restart.

-- yanis
azure-kubernetes
go
kubectl
kubernetes

0 Answers