When we start a container using the "kubectl" command, the container will have a limited set of capabilities.

The below command starts a "debian" container:


Remark:

The "--rm" parameter tells kubernetes to delete the container when it is not used.
Anything after the "--" parameter is a command to be run inside the container when it starts.

Capabilities could be added to containers as we see fit.

For example if changing the system time is not allowed in a container, we could add that capabilitiy using the "add" parameter in the Yaml file of the pod as we can see below:


With that capability, we could now use the "date" command to modify the container's system date.

To remove that capability, we use the "drop" parameter in the pod's Yaml file as below:


Brando Sabatini and Ikbal C ©. Powered by Blogger.