Problems running Kubernetes in Docker for Windows #4333
Labels
C-doc-improvement
no-issue-activity
O-external
Origin: Issue comes from external users.
P-2
Normal priority; secondary task
T-something-broken
X-stale
Projects
Milestone
Jesse Seldess (jseldess) commented:
Moved from #3184.
From @jazoom:
...
Circling back to answer my own question in case it helps someone else in future.
This is how I got around this issue in Kubernetes in Docker for Windows.
The above is actually the file I use to patch the production cockroachdb.yaml with Kustomize (which is where
$patch: delete
comes from, which isn't valid Kubernetes config YAML). It essentially shows the changes that need to be made to a normal cockroachdb config.It's a little hacky, but it seems to work well. After the container has received the signal to terminate it saves CockroachDB's data to a
hostPath
. Before the pod starts next time aninitContainer
runs and restores that data to CockroachDB's data directory. I used aninitContainer
instead of apostStart
hook becausepostStart
runs in parallel to the container's entry command.This gets around the issue because CockroachDB doesn't ever have to do its operations on a
hostPath
, yet the data is still persisted to ahostPath
between pod restarts.Jira Issue: DOC-235
The text was updated successfully, but these errors were encountered: