kubeconfig cannot be passed as credentials
Closed this issue · 8 comments
What is your question?
I am creating a porter bundle following this concept. I am using the kubernetes mixing
I have uploaded the two files below
porter.yaml
somefile.yaml
Steps used :
porter build
porter credentials apply somefile.yaml
porter install -c thesecretconfig application:v1.1.1
the install exists as follows
1 error occurred:
* mixin execution failed: package command failed /cnab/app/cnab/app/mixins/kubernetes/runtimes/kubernetes-runtime install
The connection to the server localhost:8080 was refused - did you specify the right host or port?
Error: error running command /cnab/app/usr/local/bin/kubectl apply -f /cnab/app/node-red.yaml --wait: exit status 1
What have you tried already?
Google, Github Issues and documentation.
Was the existing documentation unclear or had gaps?
As far as I can see I am following the documentation however does not seem to be working.
"path": "/home//.kube/config.yaml"
I'm assuming you left the user name out of the above path to hide it? Does your kubeconfig have a .yaml
at the end? Typically it is ~/.kube/config
Hi
Yes you are correct I left the user name out.
No it does not I see I have made a mistake in the issue.
With regards to the issue I manage to fix it in another way.
after doing porter explain on the bundle I saw the following :
To install this bundle run the following command, passing --param KEY=VALUE for any parameters you want to customize:
porter credentials generate mycreds
porter install --credential-set mycreds
Based on this I can do the porter credentials generate mycreds and then I am asked for the kubeconfig credentials. After configuring it that way I am able to interact with the cluster successfully.
@troy0820 I have uploaded images from the porter.yaml and somefile.yaml containing the credentials. Apologize for the first attempt at uploading code only :)
@troy0820 I have uploaded images from the porter.yaml and somefile.yaml containing the credentials. Apologize for the first attempt at uploading code only :)
No apologies necessary, just trying to help. The first file looks like JSON, was that because you had it outputted as json?
Also in your credential set it shows the user /home/theuser/.kube/config
In your credentials it shows /home/nonroot/.kube/config
This may be your problem.
Let me know if that helps.
@NeK000 I think the issue is that in your crendential set file the path is not actually pointing to where the k8s config file lives on your machine.
@schristoff I think we may be able to close this.
Thanks! @NeK000 - if you run into this issue again please feel encouraged to open another issue and we'll help ya