Helm/Nexus: Difference between revisions
Jump to navigation
Jump to search
Line 41: | Line 41: | ||
- name: NEXUS_SECURITY_RANDOMPASSWORD | - name: NEXUS_SECURITY_RANDOMPASSWORD | ||
value: "true" | value: "true" | ||
resources: | |||
requests: | |||
cpu: 2 | |||
memory: 2Gi | |||
limits: | |||
cpu: 4 | |||
memory: 4Gi | |||
YML | YML | ||
</syntaxhighlight> | </syntaxhighlight> |
Revision as of 23:16, 31 July 2024
helm repo add sonatype https://sonatype.github.io/helm3-charts helm repo update && helm repo list
Config
export KUBECONFIG="${HOME}/.kube/dev-kubeconfig.yaml"
export KUBECONFIG="${HOME}/.kube/gcp-kubeconfig.yaml"
export KUBECONFIG="${HOME}/.kube/config"
Install
kubectl create namespace nexus
helm show values sonatype/nexus-repository-manager --version 64.2.0|less
cat <<YML | helm -n nexus install nexus sonatype/nexus-repository-manager --version 64.2.0 -f -
fullnameOverride: nexus-repository-manager
ingress:
enabled: true
ingressClassName: nginx
annotations:
nginx.ingress.kubernetes.io/proxy-body-size: "0"
hostPath: /
hostRepo: nexus.k8s.local
serviceAccount:
create: true
name: "nexsu-sa"
persistence:
storageClass: "standard"
nexus:
env:
- name: INSTALL4J_ADD_VM_PARAMS
value: |-
-Xms2703M -Xmx2703M
-XX:MaxDirectMemorySize=2703M
-XX:+UnlockExperimentalVMOptions
-XX:+UseCGroupMemoryLimitForHeap
-Djava.util.prefs.userRoot=/nexus-data/javaprefs
-XX:LogFile=/nexus-data/home/log/jvm.log
- name: NEXUS_SECURITY_RANDOMPASSWORD
value: "true"
resources:
requests:
cpu: 2
memory: 2Gi
limits:
cpu: 4
memory: 4Gi
YML
| |
| |
xdg-open http://nexus.k8s.local &>/dev/null &
gnome-open http://nexus.k8s.local &>/dev/null &
|
x-www-browser http://nexus.k8s.local &>/dev/null &
sensible-browser http://nexus.k8s.local &>/dev/null &
|
Uninstall
helm uninstall -n nexus nexus
kubectl delete namespace nexus
Playground
helm -n nexus install nexus sonatype/nexus-repository-manager --version 64.2.0
helm -n nexus upgrade -i nexus sonatype/nexus-repository-manager --version 64.2.0
helm show values sonatype/nexus-repository-manager --version 64.2.0|less
| |
| |
NEXUS_POD_NAME="$(kubectl -n nexus get pod -l 'app.kubernetes.io/name=nexus-repository-manager' -o json|jq -r '.items[0].metadata.name')"
kubectl -n nexus exec -it svc/nexus-repository-manager -c nexus-repository-manager -- cat /nexus-data/admin.password;echo
kubectl -n nexus exec -it svc/nexus-repository-manager -c nexus-repository-manager -- bash
| |
| |
kubectl config --kubeconfig=${HOME}/.kube/aws-kubeconfig.yaml view --flatten
kubectl config --kubeconfig=${HOME}/.kube/dev-kubeconfig.yaml view --flatten
kubectl config --kubeconfig=${HOME}/.kube/gcp-kubeconfig.yaml view --flatten
kubectl config --kubeconfig=${HOME}/.kube/config view --flatten
| |
| |
kubectl -n nexus delete all --all
kubectl -n nexus delete ing --all
kubectl -n nexus delete sts --all
|
kubectl -n nexus delete svc --all
kubectl -n nexus delete pvc --all
kubectl -n nexus delete pv --all
|
| |
kubectl -n nexus rollout history deploy nexus-repository-manager
kubectl -n nexus rollout restart deploy nexus-repository-manager
kubectl -n nexus rollout status deploy nexus-repository-manager
|
kubectl -n nexus logs -f svc/nexus-repository-manager -c nexus-repository-manager
kubectl -n nexus exec -it ${NEXUS_POD_NAME} -- bash
kubectl -n nexus logs -f ${NEXUS_POD_NAME}
|
References
| ||
| ||