Skip to content

Commit 1c4095d

Browse files
authored
update readme to fix drop-in config section (#552)
Signed-off-by: Nader Ziada <[email protected]>
1 parent 2e922d6 commit 1c4095d

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

README.md

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ uvx kubernetes-mcp-server@latest --help
190190
| `--port` | Starts the MCP server in Streamable HTTP mode (path /mcp) and Server-Sent Event (SSE) (path /sse) mode and listens on the specified port . |
191191
| `--log-level` | Sets the logging level (values [from 0-9](https://github.com/kubernetes/community/blob/master/contributors/devel/sig-instrumentation/logging.md)). Similar to [kubectl logging levels](https://kubernetes.io/docs/reference/kubectl/quick-reference/#kubectl-output-verbosity-and-debugging). |
192192
| `--config` | (Optional) Path to the main TOML configuration file. See [Drop-in Configuration](#drop-in-configuration) section below for details. |
193-
| `--config-dir` | (Optional) Path to drop-in configuration directory. Files are loaded in lexical (alphabetical) order. See [Drop-in Configuration](#drop-in-configuration) section below for details. |
193+
| `--config-dir` | (Optional) Path to drop-in configuration directory. Files are loaded in lexical (alphabetical) order. Defaults to `conf.d` relative to the main config file if `--config` is specified. See [Drop-in Configuration](#drop-in-configuration) section below for details. |
194194
| `--kubeconfig` | Path to the Kubernetes configuration file. If not provided, it will try to resolve the configuration (in-cluster, default location, etc.). |
195195
| `--list-output` | Output format for resource list operations (one of: yaml, table) (default "table") |
196196
| `--read-only` | If set, the MCP server will run in read-only mode, meaning it will not allow any write operations (create, update, delete) on the Kubernetes cluster. This is useful for debugging or inspecting the cluster without making changes. |
@@ -212,6 +212,7 @@ Configuration values are loaded and merged in the following order (later sources
212212

213213
#### How Drop-in Files Work
214214

215+
- **Default Directory**: If `--config-dir` is not specified, the server looks for drop-in files in `conf.d/` relative to the main config file's directory (when `--config` is provided)
215216
- **File Naming**: Use numeric prefixes to control loading order (e.g., `00-base.toml`, `10-cluster.toml`, `99-override.toml`)
216217
- **File Extension**: Only `.toml` files are processed; dotfiles (starting with `.`) are ignored
217218
- **Partial Configuration**: Drop-in files can contain only a subset of configuration options
@@ -248,22 +249,27 @@ The server will:
248249

249250
#### Example: Using Both Config Methods
250251

251-
**Command:**
252+
**Command (using default `conf.d` directory):**
252253
```shell
253-
kubernetes-mcp-server --config /etc/kubernetes-mcp-server/config.toml \
254-
--config-dir /etc/kubernetes-mcp-server/config.d/
254+
kubernetes-mcp-server --config /etc/kubernetes-mcp-server/config.toml
255255
```
256256

257257
**Directory structure:**
258258
```
259259
/etc/kubernetes-mcp-server/
260260
├── config.toml # Main configuration
261-
└── config.d/
261+
└── conf.d/ # Default drop-in directory (automatically loaded)
262262
├── 00-base.toml # Base overrides
263263
├── 10-toolsets.toml # Toolset-specific config
264264
└── 99-local.toml # Local overrides
265265
```
266266

267+
**Command (with explicit `--config-dir`):**
268+
```shell
269+
kubernetes-mcp-server --config /etc/kubernetes-mcp-server/config.toml \
270+
--config-dir /etc/kubernetes-mcp-server/config.d/
271+
```
272+
267273
**Example drop-in file** (`10-toolsets.toml`):
268274
```toml
269275
# Override only the toolsets - all other config preserved
@@ -280,7 +286,7 @@ read_only = true
280286
**To apply changes:**
281287
```shell
282288
# Edit config files
283-
vim /etc/kubernetes-mcp-server/config.d/99-local.toml
289+
vim /etc/kubernetes-mcp-server/conf.d/99-local.toml
284290

285291
# Reload without restarting
286292
pkill -HUP kubernetes-mcp-server

0 commit comments

Comments
 (0)