apiVersion: apps/v1 kind: Deployment metadata: name: nexus namespace: nexus labels: app.kubernetes.io/name: nexus spec: replicas: 1 strategy: type: Recreate selector: matchLabels: app.kubernetes.io/name: nexus template: metadata: labels: app.kubernetes.io/name: nexus spec: automountServiceAccountToken: false securityContext: fsGroup: 200 fsGroupChangePolicy: OnRootMismatch runAsGroup: 200 runAsNonRoot: true runAsUser: 200 seccompProfile: type: RuntimeDefault terminationGracePeriodSeconds: 120 containers: - name: nexus image: docker.io/sonatype/nexus3:3.96.1@sha256:56142f13432cf072e017aebb2025f201e42ae36ff40bb82618c702504c61f7dd imagePullPolicy: IfNotPresent env: - name: INSTALL4J_ADD_VM_PARAMS value: >- -Xms1024m -Xmx2048m -XX:MaxDirectMemorySize=1024m -Djava.util.prefs.userRoot=/nexus-data/javaprefs ports: - name: http containerPort: 8081 protocol: TCP resources: requests: cpu: 250m memory: 2Gi limits: cpu: "2" memory: 4Gi securityContext: allowPrivilegeEscalation: false capabilities: drop: - ALL startupProbe: httpGet: path: /service/rest/v1/status port: http failureThreshold: 60 periodSeconds: 10 timeoutSeconds: 5 readinessProbe: httpGet: path: /service/rest/v1/status port: http failureThreshold: 6 periodSeconds: 10 timeoutSeconds: 5 livenessProbe: httpGet: path: /service/rest/v1/status port: http failureThreshold: 6 periodSeconds: 30 timeoutSeconds: 5 volumeMounts: - name: data mountPath: /nexus-data volumes: - name: data persistentVolumeClaim: claimName: nexus-data