accept-hosts
로 proxy를 개방하면 외부에서 proxy port로 http 접근이 가능kubectl config user-context context-A
/etc/kubernetes/admin.conf
Role.apiGroups: [""]
로 생략해도 됨apiGroups: [*], resources: [*], verbs: [*]
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: r-01
namespace: nm-01
rules:
- apiGroups: [""]
verbs: ["get", "list"]
resources: ["pods"]
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: rb-01
namespace: nm-01
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: r-01
subjects:
- kind: ServiceAccount
name: default
namespace: nm-01
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: cr-02
rules:
- apiGroups: ["*"]
verbs: ["*"]
resources: ["*"]
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: rb-02
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: cr-02
subjects:
- kind: ServiceAccount
name: sa-02
namespace: nm-02