Skip to content

Commit f7013ec

Browse files
authored
Merge pull request #82777 from mburke5678/node-user-namespaces-follow-up
Change UID/GID in Nodes 4.17 User Namespace Work
2 parents fc9b9dc + 2cf4a13 commit f7013ec

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

modules/nodes-pods-user-namespaces-configuring.adoc

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,8 @@ metadata:
7373
openshift.io/display-name: ""
7474
openshift.io/requester: system:admin
7575
openshift.io/sa.scc.mcs: s0:c27,c24
76-
openshift.io/sa.scc.supplemental-groups: 1024/10000 <1>
77-
openshift.io/sa.scc.uid-range: 1024/10000 <2>
76+
openshift.io/sa.scc.supplemental-groups: 1000/10000 <1>
77+
openshift.io/sa.scc.uid-range: 1000/10000 <2>
7878
# ...
7979
name: userns
8080
# ...
@@ -84,7 +84,7 @@ name: userns
8484
+
8585
[NOTE]
8686
====
87-
The range 1024/10000 means 10,000 values starting with ID 1024, so it specifies the range of IDs from 1024 to 11,023.
87+
The range 1000/10000 means 10,000 values starting with ID 1000, so it specifies the range of IDs from 1000 to 10,999.
8888
====
8989

9090
. Enable the use of Linux user namespaces by creating a pod configured to run with a `restricted` profile and with the `hostUsers` parameter set to `false`.
@@ -113,8 +113,8 @@ spec:
113113
runAsNonRoot: true <2>
114114
seccompProfile:
115115
type: RuntimeDefault
116-
runAsUser: 1024 <3>
117-
runAsGroup: 1024 <4>
116+
runAsUser: 1000 <3>
117+
runAsGroup: 1000 <4>
118118
hostUsers: false <5>
119119
120120
# ...
@@ -158,7 +158,7 @@ sh-5.1$ id
158158
.Example output
159159
[source,terminal]
160160
----
161-
uid=1024(1024) gid=1024(1024) groups=1024(1024)
161+
uid=1000(1000) gid=1000(1000) groups=1000(1000)
162162
----
163163

164164
.. Display the user ID being used in the container user namespace:
@@ -172,9 +172,9 @@ sh-5.1$ lsns -t user
172172
[source,terminal]
173173
----
174174
NS TYPE NPROCS PID USER COMMAND
175-
4026532447 user 3 1 1024 /usr/bin/coreutils --coreutils-prog-shebang=sleep /usr/bin/sleep 1000 <1>
175+
4026532447 user 3 1 1000 /usr/bin/coreutils --coreutils-prog-shebang=sleep /usr/bin/sleep 1000 <1>
176176
----
177-
<1> The UID for the process is `1024`, the same as you set in the pod spec.
177+
<1> The UID for the process is `1000`, the same as you set in the pod spec.
178178

179179
. Check the pod user ID being used on the node where the pod was created. The node is outside of the Linux user namespace. This user ID should be different from the UID being used in the container.
180180

0 commit comments

Comments
 (0)