nexus - choisungwook/portfolio GitHub Wiki
- ๊ฐ์
- ์ค๋น
- ์ ์ฅ์ ์ถ๊ฐ
- override_values.yaml ํ์ผ ์์ฑ
- ์ค์น
- nexus docker private repo ์ค์
- nexus helm ์ฌ์ฉ ๋ฉ๋ด์ผ
- ์ฟ ๋ฒ๋คํฐ์ค ์ค์น์ ํด๋ฌ์คํฐ ๊ตฌ์ฑ
- helm3 ์ค์น
- cert-manager ์ค์น์ ์ฌ์ฉ๋ฐฉ๋ฒ ์ดํด
- ์ธ๋ถ ๋๋ฉ์ธ/๋ค์์๋ฒ
- ์ค์ต์์๋ ๋ค์์๋ฒ๋ฅผ cloudflare์ฌ์ฉ
- ๋์ ํ๋ก๋น์ ๋ ํ์ฑํ
helm repo add sonatype https://sonatype.github.io/helm3-charts/
helm repo update
- ingress ํ์ฑํ
- ingress.hostRepo: ๋๋ฉ์ธ์ฃผ์
- ingress subpath ๋ณ๊ฒฝ
- nexus.env: NEXUS_CONTENT
- ingress.hostPath: NEXUS_CONTENT์ ์ค์ ํ ๊ฐ์ผ๋ก ๋ณ๊ฒฝ
- docker
- helm nexus์์๋ docker ingress์ค์ ์ด ํ์
nexus:
docker:
enabled: true
registries:
- port: 5000
host: docker.choilab.com
secretName: docker-ssl
env:
- name: NEXUS_CONTEXT
value: nexus
livenessProbe:
path: /nexus
readinessProbe:
path: /nexus
ingress:
enabled: true
annotations:
kubernetes.io/ingress.class: nginx
hostPath: /nexus
hostRepo: choilab.com
tls:
- hosts:
- docker.choilab.com
์ด ์์ ๋ dns-01 solver์ ์ฌ์ฉํ๊ณ ๋ค์์๋ฒ๋ฅผ cloudflare๋ฅผ ์ฌ์ฉํ์ต๋๋ค.
- cloudflaer accesstoekn ์์ฑ
apiVersion: v1
kind: Secret
metadata:
name: cloudflare-api-token-secret
namespace: nexus
type: Opaque
stringData:
api-token: <your-token>
- issuer ์์ฑ
apiVersion: cert-manager.io/v1
kind: Issuer
metadata:
name: nexus-prodissuser
namespace: nexus
spec:
acme:
# The ACME server URL
server: https://acme-v02.api.letsencrypt.org/directory
# Email address used for ACME registration
email: <your email>
# Name of a secret used to store the ACME account private key
privateKeySecretRef:
name: nexus-prodissuser
# Enable the challenge provider
solvers:
- dns01:
cloudflare:
email: <your email>
apiTokenSecretRef:
name: cloudflare-api-token-secret #cloudflare api token
key: api-token
- override_values.yamlํ์ผ ์์ฑ
nexus:
docker:
enabled: true
# docker domain
registries:
- port: 5000
host: docker.choilab.xyz
secretName: docker-tls
ingress:
enabled: true
annotations:
kubernetes.io/ingress.class: nginx
cert-manager.io/issuer: "nexus-prodissuser"
nginx.ingress.kubernetes.io/proxy-body-size: "0"
hostPath: /
# nexus domain
hostRepo: nexus.choilab.xyz
tls:
# docker domain
- hosts:
- docker.choilab.xyz
secretName: docker-tls
# nexus domain
- hosts:
- nexus.choilab.xyz
secretName: nexus-tls
kubectl create ns nexus
helm install -n nexus nexus -f override_values.yaml sonatype/nexus-repository-manager