kubernetes-security

Access Kubernetes API without kubectl

别来无恙 提交于 2019-12-13 16:32:41
问题 I am trying to access the Kubernetes API directly without running kubectl -proxy . But when I use the token of the serviceaccount default, I get a 403. Even after creating a ClusterRole and ClusterRoleBinding for this serviceaccount, the request is rejected with 403. The configuration I applied looks like this: apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: name: pod-reader rules: - apiGroups: [""] resources: ["pods"] verbs: ["get", "watch", "list"] --- kind:

kubernetes: CA file when deploying via kops

限于喜欢 提交于 2019-12-10 15:40:11
问题 I have created a cluster on aws using kops . However I am unable to find the file used as/by the certificate authority for spawning off client certs. Does kops create such a thing by default? If so, what is the recommended process for creating client certs? The kops documentation is not very clear about this. 回答1: I've done it like this in the past: Download the kops -generated CA certificate and signing key from S3: s3://<BUCKET_NAME>/<CLUSTER_NAME>/pki/private/ca/*.key s3://<BUCKET_NAME>/

Where can I get a list of Kubernetes API resources and subresources?

萝らか妹 提交于 2019-12-04 03:07:38
I am trying to configure Kubernetes RBAC in the least-permissive way possible and I want to scope my roles to specific resources and subresouces. I've dug through the docs and can't find a concise list of resources and their subresources. I'm particularly interested in a the subresource that governs a a part of a Deployment's spec--the container image. Using kubectl api-resources -o wide shows all the ressources , verbs and associated API-group . $ kubectl api-resources -o wide NAME SHORTNAMES APIGROUP NAMESPACED KIND VERBS bindings true Binding [create] componentstatuses cs false

RBAC Error in Kubernetes

痴心易碎 提交于 2019-12-02 12:35:15
问题 I have deployed kubernetes v1.8 in my workplace. I have created roles for admin and view access to namespaces 3months ago. In the initial phase RBAC is working as per the access given to the users. Now RBAC is not happening every who has access to the cluster is having clusteradmin access. Can you suggest the errors/changes that had to be done? 回答1: Ensure the RBAC authorization mode is still being used ( --authorization-mode=…,RBAC is part of the apiserver arguments) If it is, then check for

RBAC Error in Kubernetes

喜夏-厌秋 提交于 2019-12-02 04:27:17
I have deployed kubernetes v1.8 in my workplace. I have created roles for admin and view access to namespaces 3months ago. In the initial phase RBAC is working as per the access given to the users. Now RBAC is not happening every who has access to the cluster is having clusteradmin access. Can you suggest the errors/changes that had to be done? Ensure the RBAC authorization mode is still being used ( --authorization-mode=…,RBAC is part of the apiserver arguments) If it is, then check for a clusterrolebinding that is granting the cluster-admin role to all authenticated users: kubectl get

chown: changing ownership of '/data/db': Operation not permitted

眉间皱痕 提交于 2019-11-28 14:33:05
Can we use nfs volume plugin to maintain the High Availability and Disaster Recovery among the kubernetes cluster? I am running the pod with MongoDB. Getting the error chown: changing ownership of '/data/db': Operation not permitted . Cloud any body, Please suggest me how to resolve the error? (or) Is any alternative volume plugin is suggestible to achieve HA- DR in kubernetes cluster? Matthew L Daniel chown: changing ownership of '/data/db': Operation not permitted . You'll want to either launch the mongo container as root , so that you can chown the directory, or if the image prohibits it

chown: changing ownership of '/data/db': Operation not permitted

不羁岁月 提交于 2019-11-27 08:25:28
问题 Can we use nfs volume plugin to maintain the High Availability and Disaster Recovery among the kubernetes cluster? I am running the pod with MongoDB. Getting the error chown: changing ownership of '/data/db': Operation not permitted . Cloud any body, Please suggest me how to resolve the error? (or) Is any alternative volume plugin is suggestible to achieve HA- DR in kubernetes cluster? 回答1: chown: changing ownership of '/data/db': Operation not permitted . You'll want to either launch the