liveBook · Manning

Symbolic link

As explained in Kubernetes in Action, Second Edition

A symbolic link is a filesystem object that refers to another filesystem path rather than containing the target data itself.

A symbolic link is a filesystem object that points to another path instead of storing the target data. In Kubernetes ConfigMap and Secret volumes, links help expose updated files atomically. section 9.5.2

ConfigMap volumes use a versioned directory and links such as ..data to select the current version; individual files link through that directory to their targets. section 9.5.2

Inspecting a mounted ConfigMap

Running ls -lA inside the container shows envoy.yaml -> ..data/envoy.yaml and ..data -> ..2020_11_14_11_47_45.728287366. These links reveal how the mounted configuration selects a versioned file set. section 9.5.2

$ kubectl exec kiada-ssl -c envoy -- ls -lA /etc/envoy
total 4
drwxr-xr-x   ...  ..2020_11_14_11_47_45.728287366               #1
lrwxrwxrwx   ...  ..data -> ..2020_11_14_11_47_45.728287366     #2
lrwxrwxrwx   ...  envoy.yaml -> ..data/envoy.yaml    #3

Inspect the directory listing that shows the versioned directory, the ..data link, and the file link. section 9.5.2

Link permissions are displayed as rwxrwxrwx and do not determine access. Follow the links with ls -lL to inspect the target files’ meaningful permissions and ownership. section 9.5.4

How Kubernetes in Action, Second Edition covers it

How deep it goes
Traces link targets and permission inspection, without descending into filesystem implementation details.
Examples
Uses kubectl exec with ls -lA and ls -lL to inspect mounted configuration and target permissions.
What it assumes
Assumes familiarity with Kubernetes volume mounts and ConfigMap or Secret volumes.
What you can do after
Diagnose mounted configuration and permission behavior with kubectl exec, ls -lA, and ls -lL.
How it connects
Connects symbolic links with ConfigMap volumes, atomic updates, subPath mounts, and file permissions.

Also explained in

Compare how 2 books explain symbolic link →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Kubernetes in Action, Second Edition. The section links point to the parts of the book it draws on.