I have a Kubernetes cluster which is running in a private cloud. I want to run some commands from another VM but I receive this:
[root@runner-tmp ~]# kubectl get pods --kubeconfig local-cluster.yaml
error: tls: failed to find any PEM data in certificate input
My local-cluster.yaml:
apiVersion: v1
clusters:
- cluster:
certificate-authority-data: DATA+OMITTED
server: https://x.x.x.x:6443
name: kubernetes
contexts:
- context:
cluster: kubernetes
namespace: FSM
user: kubernetes-admin
name: kubernetes-admin@kubernetes
current-context: kubernetes-admin@kubernetes
kind: Config
preferences: {}
users:
- name: kubernetes-admin
user:
client-certificate-data: REDACTED
client-key-data: REDACTED
Do you have any idea where should I specify this PEM certificate and how can I generate it?