Last active
May 22, 2018 20:42
-
-
Save CalvinHartwell/f1d3337a333ff1c5948e8cbf62a8b9c8 to your computer and use it in GitHub Desktop.
sonatype-nexus-k8s
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # If you don't have a default storage class setup, you should remove this but it is recommended. | |
| --- | |
| apiVersion: v1 | |
| kind: PersistentVolumeClaim | |
| metadata: | |
| annotations: | |
| trident.netapp.io/reclaimPolicy: Retain | |
| name: nexus-pvc | |
| labels: | |
| app: nexus | |
| spec: | |
| accessModes: | |
| - ReadWriteOnce | |
| resources: | |
| requests: | |
| # replace with desired disk space capacity | |
| storage: 100Gi | |
| --- | |
| apiVersion: extensions/v1beta1 | |
| kind: Deployment | |
| metadata: | |
| creationTimestamp: null | |
| labels: | |
| app: nexus | |
| name: nexus | |
| spec: | |
| replicas: 1 | |
| selector: | |
| matchLabels: | |
| app: nexus | |
| strategy: {} | |
| template: | |
| metadata: | |
| creationTimestamp: null | |
| labels: | |
| app: nexus | |
| spec: | |
| containers: | |
| # default credentials are username: admin | |
| # password: admin123 | |
| - image: sonatype/nexus3 | |
| imagePullPolicy: Always | |
| name: nexus | |
| ports: | |
| - containerPort: 8081 | |
| - containerPort: 8090 | |
| volumeMounts: | |
| - mountPath: /nexus-data | |
| name: nexus-data-volume | |
| resources: {} | |
| volumes: | |
| - name: nexus-data-volume | |
| persistentVolumeClaim: | |
| claimName: nexus-pvc | |
| restartPolicy: Always | |
| serviceAccountName: "" | |
| status: {} | |
| --- | |
| apiVersion: v1 | |
| kind: Service | |
| metadata: | |
| name: nexus-docker-port | |
| labels: | |
| app: nexus | |
| spec: | |
| ports: | |
| - port: 8090 | |
| # change the port for the registry | |
| targetPort: 8090 | |
| protocol: TCP | |
| selector: | |
| app: nexus | |
| --- | |
| apiVersion: v1 | |
| kind: Service | |
| metadata: | |
| name: nexus | |
| labels: | |
| app: nexus | |
| spec: | |
| ports: | |
| - port: 443 | |
| targetPort: 8081 | |
| protocol: TCP | |
| selector: | |
| app: nexus | |
| --- | |
| apiVersion: extensions/v1beta1 | |
| kind: Ingress | |
| metadata: | |
| name: nexus | |
| annotations: | |
| kubernetes.io/ingress.class: "nginx" | |
| # this is used to set the file size to unlimited to allow for container uploads | |
| # this requires an upgraded nginx ingress controller | |
| nginx.ingress.kubernetes.io/proxy-body-size: "0" | |
| spec: | |
| rules: | |
| - host: registry-gui.somedomain.net | |
| http: | |
| paths: | |
| - path: / | |
| backend: | |
| serviceName: nexus | |
| servicePort: 443 | |
| - host: registry.somedomain.net | |
| http: | |
| paths: | |
| - path: / | |
| backend: | |
| serviceName: nexus-docker-port | |
| servicePort: 8090 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment