Box

Allgemein

Profil

Using SCC anyuid in OKD-OpenShift » Historie » Zyklus 2

Peter Pfläging, 21.07.2021 19:53

1 1 Peter Pfläging
# OKD  Openshift SCC AnyUID
2
3
```yaml
4
apiVersion: rbac.authorization.k8s.io/v1
5
kind: RoleBinding
6
metadata:
7
  name: system:openshift:scc:anyuid
8
  namespace: mysupercoolnamespace
9
roleRef:
10
  apiGroup: rbac.authorization.k8s.io
11
  kind: ClusterRole
12
  name: system:openshift:scc:anyuid
13
subjects:
14
- kind: ServiceAccount
15
  name: default
16
  namespace: mysupercoolnamespace
17 2 Peter Pfläging
```
18
19
```yaml
20 1 Peter Pfläging
kind: SecurityContextConstraints
21
apiVersion: security.openshift.io/v1
22
metadata:
23
  annotations:
24
    include.release.openshift.io/ibm-cloud-managed: "true"
25
    include.release.openshift.io/self-managed-high-availability: "true"
26
    include.release.openshift.io/single-node-developer: "true"
27
    kubernetes.io/description: anyuid provides all features of the restricted SCC but allows users to run with any UID and any GID.
28
    release.openshift.io/create-only: "true"
29
  name: anyuid
30
allowHostDirVolumePlugin: false
31
allowHostIPC: false
32
allowHostNetwork: false
33
allowHostPID: false
34
allowHostPorts: false
35
allowPrivilegeEscalation: true
36
allowPrivilegedContainer: false
37
allowedCapabilities: null
38
defaultAddCapabilities: null
39
fsGroup:
40
  type: RunAsAny
41
groups:
42
- system:cluster-admins
43
priority: 10
44
readOnlyRootFilesystem: false
45
requiredDropCapabilities:
46
- MKNOD
47
runAsUser:
48
  type: RunAsAny
49
seLinuxContext:
50
  type: MustRunAs
51
supplementalGroups:
52
  type: RunAsAny
53
users: []
54
volumes:
55
- configMap
56
- downwardAPI
57
- emptyDir
58
- persistentVolumeClaim
59
- projected
60
```