How Do You Fix “Failed to start docker.service. Unit docker.socket is masked”?

Problem scenario
You try to start the Docker service (e.g., with sudo systemctl start docker). You get this error: “Failed to start docker.service. Unit docker.socket is masked”

What should you do?

Possible solution #1

sudo systemctl unmask docker.socket
sudo systemctl unmask docker.service

This solution was adapted from this blog.

Possible solution #2
Uninstall Docker.

How Do You Troubleshoot the Kubernetes Pods Error “CrashLoopBackOff”?

Problem scenario
You have a problem with Pods not starting up. They have a status of “CrashLoopBackOff”. What should you do?

Possible Solution #1
Can the Pods start in a lower environment with minimal utilization? Being able to reproduce the problem can help. Trying the YAML in an optimal environment can help you pinpoint the error (e.g., traffic may be high in a production environment).

How Do You Troubleshoot a PVC That Appears to Still Be in Use?

Problem scenario
You are working with Kubernetes. A PVC cannot be mounted. It seems like the Persistent Volume is still in use. What should you do?

Possible Solution #1
Find out about the volume attachments with these commands:

kubectl get volumeattachment
kubectl get pv

Find the Pods that use it. Is unmounting working? Perhaps the unmounting process has a problem.

How Are Backoff Strategies (with Client Retries) Helpful?

Sometimes a client attempts to connect to or use an application. Sometimes a Kubernetes Pod is being created and tries to pull down an image. Sometimes a network device tries to establish a connection to an endpoint. These attempts can initially fail. Retries can be attempted in rapid succession. To mitigate excessive attempts in a short amount of time (to not waste resources or cause a denial-of-service attack),

How Do You Use Custom Resource Definitions in Kubernetes?

Problem scenario
You want to extend Kubernetes’ functionality. You want to use CustomResourceDefinitions. You can view API resources by running “kubectl api-resources”. You want to add to the list. How do you use a CRD?


  1. Create a file called contint.yaml with the following content:

kind: CustomResourceDefinition
kind: ContintExample
plural: contintexamples
listKind: ContintExampleList
singular: contintexample
scope: Namespaced
– name: v1
# Each version can be enabled/disabled by Served flag. …

How Do You Troubleshoot OOM Errors with Restarting Pods in Kubernetes?

Problem scenario
You find out-of-memory (aka OOM) errors in Kubernetes. The node seems healthy. The pods keep restarting. What should you do?

Possible Solution #1
Are you using a burstable quality of service (aka QoS) with the pods? There may be a non-pod-specific reason and the burstable Pods are being starved of resources. The node may be getting requests for other pods with a superior quality of service.

In I.T., what is a Schema?

In computing, what is the definition of a schema?

Answer / schema disambiguation
Outside of the I.T. realm, Merriam-Webster’s Dictionary (11th Edition, on page 1110) defines schema as “a diagrammatic presentation; broadly: a structured framework or plan: outline.” This definition must have influenced the appropriation of the word to refer to concepts in I.T..

For Kubernetes
“Schemas are the set of JSON files for various Kubernetes versions,

How Do You Troubleshoot the Error “unable to prepare context…no such file or directory”?

Problem scenario
You run “docker-compose build” and you get this:

1 error occurred:
* unable to prepare context: unable to evaluate symlinks in Dockerfile path: lstat /home/jane/dockercompose/webapp/Dockerfile: no such file or directory

What should you do?

Look at your docker-compose.yml file. Look at the “build” stanza. What directory is it referring to? Is a Dockerfile file in that directory?