Skip to content

Querying and Changing Cilium Configuration with the Cilium CLI: CCA practice questions

The Cilium CLI is the cilium binary you run from a workstation; it talks to the cluster through kubeconfig. It is not cilium-dbg, which runs inside an agent pod. Configuration lives in two places that the CLI can reach: the agent configuration that the agents read at startup, and the Helm release that cilium install created.

By Ibrahim Yesilay · Published · Updated

Independent community practice, not affiliated with or endorsed by CNCF or The Linux Foundation.

What Querying and Changing Cilium Configuration with the Cilium CLI covers in CCA

The Cilium CLI is the cilium binary you run from a workstation; it talks to the cluster through kubeconfig. It is not cilium-dbg, which runs inside an agent pod. Configuration lives in two places that the CLI can reach: the agent configuration that the agents read at startup, and the Helm release that cilium install created.

The config command manages the agent configuration and has three subcommands. cilium config view prints the current values. cilium config set takes exactly two arguments, a key and a value, for example cilium config set debug true. cilium config delete takes a single key and removes it. Both set and delete have a --restart flag, short -r, which defaults to true, so the Cilium pods are restarted and the agents load the change at once. Pass --restart=false to write the value now and restart the agents later.

Many settings are better changed through Helm values, because cilium install and cilium upgrade are wrappers around Helm. Values are given with --set, --set-string, --set-file and -f/--values; the older spellings --helm-set, --helm-set-string, --helm-set-file and --helm-values still work because the CLI normalises them to the shorter names. To see what the CLI used for an existing installation, the README points to helm get values -n kube-system cilium.

Upgrades deserve a review step. cilium upgrade does not rewrite your non-default Helm values to match a new release; by default it resets to the new chart and reuses your existing values. Two flags let you look before acting: --dry-run writes the Kubernetes resources to stdout, so piping it into kubectl diff -f - shows what would change in the live cluster, and --dry-run-helm-values prints only the non-default values that would be used. The same command can move to an older version, so cilium upgrade --version also handles downgrades.

To check what the running agents actually have turned on, cilium features status reports enabled features per node, with --node to pick one node and -o for tab, markdown or json output. cilium status gives the health summary of the agent DaemonSet, operator, Envoy, Relay and Cluster Mesh.

Key points

  • cilium config has only view, set and delete; set takes exactly two arguments.
  • config set and delete restart the Cilium pods unless --restart=false is given.
  • --helm-set is normalised to --set, and --helm-values to --values.
  • cilium upgrade --dry-run-helm-values previews the non-default values without upgrading.
  • cilium features status lists the features enabled in the running agents.

Three sample questions

13 CCA questions on Querying and Changing Cilium Configuration with the Cilium CLI, 13 with explanations. How practice works

Question 1

Which command shows the current Cilium configuration values?
  1. A.cilium config view
  2. B.cilium config show
  3. C.cilium settings
  4. D.cilium get config

Correct answer: A

The cilium CLI config command has the subcommands view ("View current configuration"), set and delete; cilium config view prints the cilium-config ConfigMap values. Why the other options are wrong. config show, settings and get config are not cilium CLI commands.

Sources: Cilium CLI source: config command, Cilium CLI README

Question 2

How can you change a Cilium agent configuration option, such as debug, with the Cilium CLI?
  1. A.cilium config set debug true
  2. B.cilium set-config debug=true
  3. C.cilium config debug=true --live
  4. D.kubectl exec -n kube-system ds/cilium -- cilium set debug=true

Correct answer: A

cilium config set takes exactly two arguments, the key and the value, writes them to the cilium-config ConfigMap and, with its --restart flag defaulting to true, restarts the Cilium pods so that the agents pick the change up. Why the other options are wrong. set-config: not a cilium CLI command. "config debug=true --live": config needs a subcommand (view, set, delete) and has no --live flag. The kubectl exec form: the in-pod debug client is cilium-dbg, and set is not one of its commands for agent options.

Sources: Cilium CLI source: config command, Cilium CLI README

Question 3

Which command upgrades Cilium while overriding specific configuration values?
  1. A.cilium config upgrade --set prometheus.enabled=true
  2. B.cilium install --version 1.20.4 --set prometheus.enabled=true
  3. C.cilium upgrade --version 1.20.4 --helm-set prometheus.enabled=true
  4. D.cilium upgrade --config prometheus.enabled=true --version 1.20.4

Correct answer: C

cilium upgrade upgrades an existing installation through Helm; --version picks the chart version and --helm-set (the CLI also accepts --set) overrides a chart value such as prometheus.enabled, which turns on the agent metrics endpoint. Why the other options are wrong. "cilium config upgrade": config only has the view, set and delete subcommands. "cilium install --version ...": install is for a new installation, not an upgrade of a running one. "cilium upgrade --config ...": upgrade has no --config flag for chart values.

Sources: Cilium CLI source: install and upgrade commands, Cilium docs: Monitoring & Metrics

Practice this topic

Focus mode keeps every question on Querying and Changing Cilium Configuration with the Cilium CLI until you leave it. 10 free guest answers, then a free account; no credit card.

Or open CCA practice across all topics.

Sources

The explanation above was checked against these official documents.