Ckas

Commands and Arguments

Commands and Arguments

Roshan Khatri
Containers are meant to run a specific process. Once the task is complete the container exits. CMD within Dockerfile defines the default command that runs inside the container once it starts. command overrides the entrypoint used in Dockerfile. args override the cmd field in the Dockerfile. spec: containers: - name: ubuntu-sleeper image: ubuntu-sleeper command: [ "sleep" ] args: [ "infinite" ] The inclusion of command and args in a pod in deployment takes the form of the following screenshot
Getting help with YAMLs

Getting help with YAMLs

Roshan Khatri
Kubernetes built in kubectl explain command can be used as a helper tool when in confusion with YAMLs relating to kubernetes object. kubectl explain pod A level deep navigation into the pod would be something like kubectl explain pod.spec One move level deep navigation would be like kuebctl explain pod.spec.affinity The output of which looks like Another super useful command to list all available values one level below of affinity can be accomplished using
Kubernetes Resource requirements

Kubernetes Resource requirements

Roshan Khatri
Resource Requirements Resource Requirements limits CPU and Memory containers can use on kubernetes cluster. These are added as requests and limits on the containers. Requests are resources that can be requested by containers. Limits are the hard limits which the resources will be allocated to the container by the cluster. LimitRange can be used to specify the default limits on the cluster. Resourcequota are used to limit the resources on a namespace level.