Skip to content
spiddy edited this page Mar 24, 2017 · 3 revisions

Kubernetes Authentication

This is a list of possible Kubernetes Authentications.

Minikube

apiVersion: v1
clusters:
- cluster:
    certificate-authority: /Users/username/.minikube/ca.crt
    server: https://192.168.99.100:8443
  name: minikube
contexts:
- context:
    cluster: minikube
    user: minikube
  name: minikube
current-context: minikube
kind: Config
preferences: {}
users:
- name: minikube
  user:
    client-certificate: /Users/username/.minikube/apiserver.crt
    client-key: /Users/username/.minikube/apiserver.key

Google GKE

Kubernetes in Google Container Engine (GKE) the config can be retrieved with:

gcloud container clusters get-credentials cluster-1--zone us-central1-a --project myproject-123456

The output:

apiVersion: v1
clusters:
- cluster:
    certificate-authority-data: REDACTED
    server: https://101.102.103.104
  name: gke_myproject-123456_us-central1-a_cluster-1
contexts:
- context:
    cluster: gke_myproject-123456_us-central1-a_cluster-1
    user: gke_myproject-123456_us-central1-a_cluster-1
  name: gke_myproject-123456_us-central1-a_cluster-1
current-context: gke_myproject-123456_us-central1-a_cluster-1
kind: Config
preferences: {}
users:
- name: gke_myproject-123456_us-central1-a_cluster-1
  user:
    auth-provider:
      name: gcp

KOPS AWS

Amazon AWS Clusters provisioned by Kops. The config can be retrieved by

kops export kubecfg k8s.mydomain.io
apiVersion: v1
clusters:
- cluster:
    certificate-authority-data: REDACTED
    server: https://api.k8s.mydomain.io
  name: k8s.mydomain.io
contexts:
- context:
    cluster: k8s.mydomain.io
    user: k8s.mydomain.io
  name: k8s.mydomain.io
current-context: k8s.mydomain.io
kind: Config
preferences: {}
users:
- name: k8s.mydomain.io
  user:
    client-certificate-data: REDACTED
    client-key-data: REDACTED
    password: REDACTED
    username: admin
- name: k8s.mydomain.io-basic-auth
  user:
    password: REDACTED
    username: admin
Clone this wiki locally