VOL-3365 - update code to generate k8s config

Change-Id: If7d656a7e4453d914a46449c9d795e433e750976
diff --git a/voltha b/voltha
index 8c4542e..65347e9 100755
--- a/voltha
+++ b/voltha
@@ -1529,13 +1529,12 @@
         espin "$VERIFIED"
     fi
 
-    if [ "$HELM_MAJOR" -le 2 ]; then
-        KUBECONFIG="$(kind get kubeconfig-path --name="voltha-$NAME")"; export KUBECONFIG
-    else
-        KUBECONFIG="$HOME/.kube/kind-config-voltha-$NAME"; export KUBECONFIG
-        mkdir -p "$HOME/.kube"
-        kind get kubeconfig --name="voltha-$NAME" >"$KUBECONFIG"
-    fi
+    KUBECONFIG_TMP=$(mktemp)
+    kind get kubeconfig --name="voltha-$NAME" >"$KUBECONFIG_TMP"
+    mkdir -p "$HOME/.kube"
+    KUBECONFIG="$HOME/.kube/kind-config-voltha-$NAME"; export KUBECONFIG
+    cp "$KUBECONFIG_TMP" "$KUBECONFIG"
+    rm -rf "$KUBECONFIG_TMP"
 
     P="coredns-.* \
         etcd-voltha-$NAME-control-plane \