Skip to content

Commit ce3d466

Browse files
devin-ai-integration[bot]fern-supportthesandlord
authored
docs: add Kubernetes deployment section to self-hosted set-up page (#3487)
Co-authored-by: fern-support <support@buildwithfern.com> Co-authored-by: Fern Support <info@buildwithfern.com> Co-authored-by: Sandeep Dinesh <sandeep@buildwithfern.com>
1 parent dd49094 commit ce3d466

1 file changed

Lines changed: 99 additions & 0 deletions

File tree

fern/products/docs/pages/enterprise/self-hosted-set-up.mdx

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,3 +252,102 @@ The container parses all `generators.yml` files in your fern directory, finds pr
252252

253253
</Step>
254254
</Steps>
255+
256+
### Kubernetes deployment
257+
258+
Here is a sample Deployment and Service configuration. Replace `your-registry/fern-docs:latest` with your image name.
259+
260+
**deployment.yaml:**
261+
262+
```yaml deployment.yaml
263+
apiVersion: apps/v1
264+
kind: Deployment
265+
metadata:
266+
name: fern-docs
267+
labels:
268+
app: fern-docs
269+
spec:
270+
replicas: 1
271+
selector:
272+
matchLabels:
273+
app: fern-docs
274+
template:
275+
metadata:
276+
labels:
277+
app: fern-docs
278+
spec:
279+
securityContext:
280+
runAsNonRoot: true
281+
runAsUser: 65532
282+
runAsGroup: 65532
283+
fsGroup: 65532
284+
fsGroupChangePolicy: OnRootMismatch
285+
containers:
286+
- name: fern-docs
287+
image: your-registry/fern-docs:latest
288+
imagePullPolicy: IfNotPresent
289+
ports:
290+
- name: docs
291+
containerPort: 3000
292+
protocol: TCP
293+
- name: health
294+
containerPort: 8081
295+
protocol: TCP
296+
resources:
297+
requests:
298+
memory: "2Gi"
299+
cpu: "1000m"
300+
limits:
301+
memory: "4Gi"
302+
cpu: "2000m"
303+
livenessProbe:
304+
httpGet:
305+
path: /liveness
306+
port: 8081
307+
initialDelaySeconds: 120
308+
periodSeconds: 10
309+
timeoutSeconds: 5
310+
failureThreshold: 3
311+
readinessProbe:
312+
httpGet:
313+
path: /readiness
314+
port: 8081
315+
initialDelaySeconds: 60
316+
periodSeconds: 5
317+
timeoutSeconds: 5
318+
failureThreshold: 6
319+
securityContext:
320+
allowPrivilegeEscalation: false
321+
runAsNonRoot: true
322+
runAsUser: 65532
323+
runAsGroup: 65532
324+
privileged: false
325+
readOnlyRootFilesystem: false
326+
capabilities:
327+
drop:
328+
- ALL
329+
terminationGracePeriodSeconds: 30
330+
```
331+
332+
**service.yaml:**
333+
334+
```yaml service.yaml
335+
apiVersion: v1
336+
kind: Service
337+
metadata:
338+
name: fern-docs
339+
labels:
340+
app: fern-docs
341+
spec:
342+
type: NodePort
343+
ports:
344+
- name: http
345+
port: 80
346+
targetPort: 3000
347+
protocol: TCP
348+
nodePort: 30080
349+
selector:
350+
app: fern-docs
351+
```
352+
353+
For health check endpoint details, see [Health check endpoints](/learn/docs/self-hosted/health-check-endpoints).

0 commit comments

Comments
 (0)