kubernetes – kubectl use config for authentication
I’m creating a pipeline to deploy some application in kubernetes.
I’ve been given the authentication credentials as a yaml file similar to the following:
apiVersion: v1
clusters:
- cluster:
certificate-authority-data: LS0tL******0tLS0t
server: https://api.whatever.com
name: gs-name-clientcert
contexts:
- context:
cluster: gs-name-clientcert
user: gs-name-clientcert-user
name: gs-name-clientcert
current-context: gs-name-clientcert
kind: Config
preferences: {}
users:
- name: gs-name-clientcert-user
user:
client-certificate-data: LS************RS0tLS0t
client-key-data: LS0tL***********tLQ==
How can I tell kubectl to use that config file when I use the apply command?
Thanks.
Read more here: Source link