Hello and welcome to this lecture on Security Contexts in Kubernetes.
My name is Mumshad Mannambeth as we saw in the previous lecture.
When you run a docker container you have the option to define a set of security standards such as the
ID of the user used to run the container,
The Linux capabilities that can be added or removed from the container etc. These can be configured
in Kubernetes as well. As you know already, in
Kubernetes containers are encapsulated in PODs.
You may choose to configure the security settings at a container level or at a pod level.
If you configure it at a pod level the settings will carry over to all the containers within the pod.
If you can figure it at both the pod and the container the settings on the container will override
the settings on the pod let us start with a pod definition file.
This pod runs an ubuntu image with the sleep command. To configure security context on the container,
had a field called security context under the specs section of the pod used to run as a user option
to set the user I.D. for the pod to set the same configuration on the container level move the whole
section under the container specification like this to add capabilities used the capabilities option
and specify a list of capabilities to add to the pod.
Well that's all.
On security context in Kubernetes head over to the coding exercises section and practice viewing configuring
and troubleshooting issues related to security contexts in Kubernetes.
That's it for now and I will see you in the next lecture.