Kubernetes + Georserver + PV Permission Issue

9/2/2021

If I add volume mount to the geoserver deployment manifest it starts giving permission errors. Deployment works without volume mount. Has anyone faced this problem and know how to fix?

Dockerfile

geoserver-deployment.yaml

apiVersion: apps/v1
kind: StatefulSet
metadata:
  name: geoserver
  namespace: gis
  labels:
    app: geoserver
spec:
  serviceName: geoserver
  replicas: 1
  selector:
    matchLabels:
      service: geoserver
  template:
    metadata:
      labels:
        app: geoserver
        service: geoserver
    spec:
      containers:
      - name: geoserver
        securityContext:
          privileged: true
          runAsUser: 1000
          runAsGroup: 10001
        image: abhijeetkoli/geoserver:latest
        ports:
          - containerPort: 8080
            protocol: TCP
          - containerPort: 8443
            protocol: TCP
        envFrom:
        - configMapRef:
            name: gs-config
-- Abhijeet Koli
geoserver
kubernetes

0 Answers