kubeconfig.yaml is required for Voicegain to remotely Manage Edge deployment on a Cloud Kubernetes Cluster.
In needs to be uploaded into Voicegain Web Console, see image below:
In order to generate kubecconfig.yaml on GKE you can follow these Google instructions: Authenticating to the Kubernetes API server | Kubernetes Engine Documentation | Google Cloud
Alternatively, you can run the following commands:
kubectl -n kube-system create serviceaccount voicegain-manage
kubectl create clusterrolebinding voicegain-manage --clusterrole=cluster-admin --serviceaccount=kube-system:voicegain-manage
TOKENNAME=`kubectl -n kube-system get serviceaccount/voicegain-manage -o jsonpath='{.secrets[0].name}'`
CA=$(kubectl get -n kube-system secret/$TOKENNAME -o jsonpath='{.data.ca\.crt}')
TOKEN=$(kubectl get -n kube-system secret/$TOKENNAME -o jsonpath='{.data.token}' | base64 --decode)
### endpoint ip
SERVER_URL=https://34.34.34.34
echo "
apiVersion: v1
kind: Config
clusters:
- name: vg-edge-cluster
cluster:
certificate-authority-data: ${CA}
server: ${SERVER_URL}
contexts:
- name: vg-edge-context
context:
cluster: vg-edge-cluster
user: vg-edge-user
current-context: vg-edge-context
users:
- name: vg-edge-user
user:
token: ${TOKEN}
" > kubeconfig.yaml
Comments
0 comments
Please sign in to leave a comment.