attilapiros commented on pull request #30751:
URL: https://github.com/apache/spark/pull/30751#issuecomment-786618151


   > I tested both Minikube v1.16.0 and v1.17.0 in two machines.
   > `minikube kubectl config view` shows multiple configurations.
   > This patch doesn't work on the real machines which have other production 
K8s cluster configuration together because this PR assumes a vanilla machine 
without any other kube cluster configurations.
   
   I had tested with the latest Minikube version (v1.15.1) which was available 
at the opening of the PR. 
   And unfortunately when I was running the test on my machine there was only 
one k8s cluster active: the one started by the Minikube. 
   
   @dongjoon-hyun You really was looking for the right direction to fix this. 
Thanks again for your efforts!
   
   As I see what we need here is some extra "-" after the `kubectl` to be able 
to pass the `--minify` flag:
   ```
   $ minikube kubectl -- config  view --minify
   apiVersion: v1
   clusters:
   - cluster:
       certificate-authority: /Users/attilazsoltpiros/.minikube/ca.crt
       server: https://127.0.0.1:55004
     name: minikube
   contexts:
   - context:
       cluster: minikube
       namespace: default
       user: minikube
     name: minikube
   current-context: minikube
   kind: Config
   preferences: {}
   users:
   - name: minikube
     user:
       client-certificate: 
/Users/attilazsoltpiros/.minikube/profiles/minikube/client.crt
       client-key: 
/Users/attilazsoltpiros/.minikube/profiles/minikube/client.key
   ```
   
   I have now tested this with running a 2nd k8s cluster so without the 
`minify` I get both clusters, contexts and users:
   ```
   $ minikube kubectl config view
   apiVersion: v1
   clusters:
   - cluster:
       certificate-authority: /Users/attilazsoltpiros/.minikube/ca.crt
       server: https://127.0.0.1:55004
     name: minikube
   - cluster:
       certificate-authority-data: DATA+OMITTED
       server: https://127.0.0.1:6443
     name: talos-default
   contexts:
   - context:
       cluster: talos-default
       namespace: default
       user: admin@talos-default
     name: admin@talos-default
   - context:
       cluster: minikube
       namespace: default
       user: minikube
     name: minikube
   - context:
       cluster: ""
       user: ""
     name: minikuve
   current-context: minikube
   kind: Config
   preferences: {}
   users:
   - name: admin@talos-default
     user:
       client-certificate-data: REDACTED
       client-key-data: REDACTED
   - name: minikube
     user:
       client-certificate: 
/Users/attilazsoltpiros/.minikube/profiles/minikube/client.crt
       client-key: 
/Users/attilazsoltpiros/.minikube/profiles/minikube/client.key
   ```
   
   I do not want to rush this fix though especially as it is now reverted: I 
would like to take a time and test this on several Minikube versions before I 
give the go-ahead.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to