Skip to content

Commit 9097b16

Browse files
authored
Update run-mcp-k8s.md with gofetch example (#46)
1 parent 1a140d7 commit 9097b16

File tree

1 file changed

+4
-16
lines changed

1 file changed

+4
-16
lines changed

docs/toolhive/guides-k8s/run-mcp-k8s.md

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -208,9 +208,7 @@ The `podTemplateSpec` field follows the standard Kubernetes
208208
[`PodTemplateSpec`](https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-template-v1/#PodTemplateSpec)
209209
format, so you can use any valid pod specification options.
210210

211-
This example sets security contexts and resource limits. It lets the MCP
212-
container to run as root, an unfortunate requirement for the Fetch MCP server
213-
image, while still applying some security restrictions.
211+
This example sets resource limits.
214212

215213
```yaml {13-14} title="my-mcpserver-custom-pod.yaml"
216214
apiVersion: toolhive.stacklok.dev/v1alpha1
@@ -219,34 +217,24 @@ metadata:
219217
name: fetch
220218
namespace: development # Can be any namespace
221219
spec:
222-
image: docker.io/mcp/fetch
223-
transport: stdio
220+
image: ghcr.io/stackloklabs/gofetch/server
221+
transport: sse
224222
port: 8080
223+
targetPort: 8080
225224
permissionProfile:
226225
type: builtin
227226
name: network
228227
podTemplateSpec:
229228
spec:
230229
containers:
231230
- name: mcp # This name must be "mcp"
232-
securityContext:
233-
allowPrivilegeEscalation: false
234-
runAsNonRoot: false # Allows the MCP container to run as root
235-
runAsUser: 0
236-
capabilities:
237-
drop:
238-
- ALL
239231
resources: # These resources apply to the MCP container
240232
limits:
241233
cpu: '500m'
242234
memory: '512Mi'
243235
requests:
244236
cpu: '100m'
245237
memory: '128Mi'
246-
securityContext:
247-
runAsNonRoot: true # The pod itself can run as a non-root user
248-
seccompProfile:
249-
type: RuntimeDefault
250238
resources: # These resources apply to the proxy container
251239
limits:
252240
cpu: '100m'

0 commit comments

Comments
 (0)