using kubectl
and kops
1.8
When spinning of a cluster in aws
using kops
the client certificate (present as string in the client-certificate-data
field of ~/.kube/config
) created has the following values:
Subject: O=system:masters, CN=kubecfg
Unless I am wrong, starting from kubernetes 1.4
, the value for O
rganitazion is interpeted as group
information (string associated with CN
value is the so-called user, since k8s
does not inherently have such a concept)
1: How can I see what permissions are associated with the system:masters
group and/or the kubecfg
user?
- (related to the above): what is the out-of-the-box authorization method I am using now?
RBAC
? How can I check this?
2: Why the entries in my ~/.kube/config
do not incorporate a kubecfg
user? (but rather a user bearing my cluster name and another user named admin
?)
$ kubectl config view
apiVersion: v1
clusters:
- cluster:
certificate-authority-data: REDACTED
server: <server_url>
name: <my_cluster_name>
contexts:
- context:
cluster: <my_cluster_name>
user: <my_cluster_name>
name: <my_cluster_name>
current-context: <my_cluster_name>
kind: Config
preferences: {}
users:
- name: <my_cluster_name>
user:
client-certificate-data: REDACTED
client-key-data: REDACTED
password: <some_pass>
username: admin
- name: <my_cluster_name>.local-basic-auth
user:
password: <some_pass>
username: admin
At the end of the day, what user I am performing api calls with, when executing kubectl
commands?
update: I tried to mess up the value of client-certificate-data
in my ~/.kube/config
and I got
error: tls: private key does not match public key
I am assuming this means I am using a x509
based auth (?)
So I am making api calls as kubecfg
?