I am looking for pointers on how to create/update services and endpoints using the client-go API. Can't seem to find any examples or documentation on how to do it.
Thanks! Satish
clientset.CoreV1().Services("kube-system").Create(&corev1.Service{
ObjectMeta: metav1.ObjectMeta{
Name: controllerSVCName,
Namespace: "kube-system",
Labels: map[string]string{
"k8s-app": "kube-controller-manager",
},
},
Spec: corev1.ServiceSpec{
Ports: nil,
Selector: nil,
ClusterIP: "",
},
})
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With