Sonatype Nexus Repository OSS Integration
This documentation guide provides comprehensive instructions for integrating Sonatype Nexus Repository OSS (Nexus) with KubeRocketCI.
Prerequisitesβ
Before proceeding, ensure the following prerequisites are met:
- Kubectl version 1.28.0+ is installed. Please refer to the Kubernetes official website for details.
- Helm version 3.14.0+ is installed. Please refer to the Helm page on GitHub for details.
Installationβ
To install Nexus in environment, it's recommended to use the resources provided in the Cluster Add-Ons repository. This approach involves installing both the Nexus repository manager and the nexus-operator. Leveraging the Cluster Add-Ons simplifies the deployment and management process, providing a streamlined method to integrate Nexus into infrastructure:
-
Nexus Repository Manager: First, navigate to the forked cluster Add-Ons repository and align the nexus values.yaml and nexus-operator values.yaml files. Follow the instructions to deploy Nexus, ensuring it's correctly configured to serve as artifact repository.
-
Update the configuration to enable nexus and nexus-operator in Add-Ons repository:
clusters/core/apps/values.yamlnexus:
createNamespace: true
enable: true
nexus-operator:
createNamespace: true
enable: true -
Sync resources and wait till the all nexus and nexus-operator resources is created:

-
Sign In into Nexus Repository Manager using the default credentials Username:
adminand Password:admin123and update the default password for better security:
Configurationβ
With Add-ons approach nexus-operator create the necessary roles, Service Account ci.user, blob stores, repository, scripts, cleanup policies automatically.
KubeRocketCI organizes artifacts within Nexus according to the following hierarchy:
βββ krci-dotnet-group
β βββ krci-dotnet-proxy
β βββ krci-dotnet-releases
β βββ krci-dotnet-snapshots
β βββ krci-dotnet-hosted
krci-maven-group
β βββ krci-maven-proxy
β βββ krci-maven-releases
β βββ krci-maven-snapshots
krci-npm-group
β βββ krci-npm-proxy
β βββ krci-npm-releases
β βββ krci-npm-snapshots
β βββ krci-npm-hosted
krci-python-group
β βββ krci-python-proxy
β βββ krci-python-releases
β βββ krci-python-snapshots
krci-yum-group
βββ krci-yum-releases
βββ krci-yum-snapshots
βββ krci-container-hosted
Below is a comprehensive guide on how to create all the resources manually.
Configure Nexus Repository Manager With nexus-operatorβ
- Create a Kubernetes Secret that the nexus-operator will use to connect to the Nexus Repository Manager and create all resources:
- Manifests
- External Secrets Operator
apiVersion: v1
kind: Secret
metadata:
name: nexus-admin-password
namespace: nexus
type: Opaque
data:
user: YWRtaW4= # base64-encoded value of "admin"
password: cGFzcw== # base64-encoded value of "pass"
"nexus-admin-password":
{
"user": "XXXXXXX",
"password": "XXXXXXX"
}
- Create a secret using
manifestsor withExternal Secrets Operatorto enable the edp-nexus-operator to connect to the Nexus Repository Manager for provisioning:
- Manifests
- External Secrets Operator
apiVersion: v1
kind: Secret
metadata:
name: ci-nexus
namespace: nexus
type: Opaque
stringData:
password: <nexus-user-password>
"ci-nexus":
{
"password": "XXXXXXX"
}
Configure Nexus Repository Manager Without nexus-operatorβ
Without using the nexus-operator, manual updates are required for the Helm chart values of the Nexus Repository Manager, as well as the creation of blob stores, repositories, roles, and the Service Account ci.user:
-
Create blob store. Open the Nexus UI and navigate to Server administration and configuration -> Repository -> Blob Stores and click Create Blob Store, fill the following fields and click Save button:
- Java
- JavaScript
- DotNet
- Python
- RPM
- Type:
File - Name:
krci-maven
- Type:
File - Name:
krci-npm
- Type:
File - Name:
krci-dotnet
- Type:
File - Name:
krci-python
- Type:
File - Name:
krci-yum
-
KubeRocketCI operates using a specific repository naming convention, where all repository names adhere to predefined standards. To align with this, navigate to Server administration and configuration -> Repository -> Repositories within Nexus. Here, repository creation is limited to those that match the required programming language, ensuring consistency and compliance with the KubeRocketCI framework.

- Java
- JavaScript
- DotNet
- Python
- RPM
a) Click Create a repository by selecting
maven2(proxy)fill the following fields and click Create repository:- Name
krci-maven-proxy - Remote storage URL
https://repo1.maven.org/maven2/ - Blob store
krci-maven - HTTP request settings
check - Use-agent customization
user-agent-suffix - Connection retries
10 - Connection timeout
1440
b) Click Create a repository by selecting
maven2(hosted)fill the following fields and click Create repository:- Name
krci-maven-snapshots - Version policy
snapshots - Blob store
krci-maven
c) Click Create a repository by selecting
maven2(hosted)fill the following fields and click Create repository:- Name
krci-maven-releases - Version policy
release - Blob store
krci-maven
d) Click Create a repository by selecting
maven2(group)fill the following fields and click Create repository:- Name
krci-maven-group - Version policy
release - Member repositories
krci-maven-proxy,krci-maven-snapshots,krci-maven-releases
a) Click Create a repository by selecting
npm(proxy)fill the following fields Create repository:- Name
krci-npm-proxy - Remote storage URL
https://registry.npmjs.org - Blob store
krci-npm - HTTP request settings
check - Use-agent customization
user-agent-suffix - Connection retries
10 - Connection timeout
1440
b) Click Create a repository by selecting
npm(hosted)fill the following fields and click Create repository:- Name
krci-npm-snapshots - Blob store
krci-npm
c) Click Create a repository by selecting
npm(hosted)fill the following fields and click Create repository:- Name
krci-npm-releases - Blob store
krci-npm
d) Click Create a repository by selecting
npm(hosted)fill the following fields and click Create repository:- Name
krci-npm-hosted - Blob store
krci-npm
e) Click Create a repository by selecting
npm(group)fill the following fields and click Create repository:- Name
krci-npm-group - Member repositories
krci-npm-proxy,krci-npm-snapshots,krci-npm-releases,krci-npm-hosted
a) Click Create a repository by selecting
nuget(proxy)fill the following fields and click Create repository:- Name
krci-dotnet-proxy - Protocol version NuGet V3
check - Remote storage URL
https://api.nuget.org/v3/index.json - Blob store
krci-dotnet - HTTP request settings
check - Use-agent customization
user-agent-suffix - Connection retries
10 - Connection timeout
1440
b) Click Create a repository by selecting
nuget(hosted)fill the following fields and click Create repository:- Name
krci-dotnet-snapshots - Blob store
krci-dotnet
c) Click Create a repository by selecting
nuget(hosted)fill the following fields and click Create repository:- Name
krci-dotnet-releases - Blob store
krci-dotnet
d) Click Create a repository by selecting
nuget(hosted)fill the following fields and click Create repository:- Name
krci-dotnet-hosted - Blob store
krci-dotnet
e) Click Create a repository by selecting
nuget(group)fill the following fields and click Create repository:- Name
krci-dotnet-group - Member repositories
krci-dotnet-proxy,krci-dotnet-snapshots,krci-dotnet-releases,krci-dotnet-hosted
a) Click Create a repository by selecting
pypi(proxy)fill the following fields and click Create repository:- Name
krci-python-proxy - Remote storage URL
https://pypi.org - Blob store
krci-python - HTTP request settings
check - Use-agent customization
user-agent-suffix - Connection retries
10 - Connection timeout
1440
b) Click Create a repository by selecting
pypi(hosted)fill the following fields and click Create repository:- Name
krci-python-snapshots - Blob store
krci-python
c) Click Create a repository by selecting
pypi(hosted)fill the following fields and click Create repository:- Name
krci-python-releases - Blob store
krci-python
d) Click Create a repository by selecting
pypi(group)fill the following fields and click Create repository:- Name
krci-python-group - Member repositories
krci-python-proxy,krci-python-snapshots,krci-python-releases
a) Click Create a repository by selecting
yum(proxy)fill the following fields and click Create repository:- Name
krci-yum-proxy - Remote storage URL
http://fedora.ip-connect.info/linux/development/rawhide/Everything/x86_64/os/ - Blob store
krci-yum - HTTP request settings
check - Use-agent customization
user-agent-suffix - Connection retries
10 - Connection timeout
1440
b) Click Create a repository by selecting
yum(hosted)fill the following fields and click Create repository:- Name
krci-yum-snapshots - Repo data Depth
3 - Blob store
krci-yum
c) Click Create a repository by selecting
yum(hosted)fill the following fields and click Create repository:- Name
krci-yum-releases - Repo data Depth
3 - Blob store
krci-yum
-
Open the Nexus UI and navigate to Server administration and configuration -> Security -> Roles. Click the Create Role button, fill the following fields and click Save button:
- Type:
Nexus role - Role ID:
krci-admin - Role Name:
krci-admin - Role Descriptions:
Read and write access to all repos and scripts - Applied Privileges:
nx-apikey-all,nx-repository-view-*-*-add,nx-repository-view-*-*-browse,nx-repository-view-*-*-edit,nx-repository-view-*-*-read,nx-script-*-add,nx-script-*-delete,nx-script-*-read,nx-script-*-run

- Type:
-
Create repository Service Account
ci.user. Open the Nexus UI and navigate to Server administration and configuration -> Security -> User. Click theCreate local userbutton to create a new user:
-
Type the
ci.userusername, fill the following fields and click the Create local user button to create the *Service Account, fill the following fields and click Save button::- ID:
ci.user - First name:
ci.user - Last name:
CI - Email:
ci.user@krci.com - Password:
<nexus-user-password> - Status:
Active - Roles:
krci-admin

- ID:
Integrate Nexus Repository Manager With KubeRocketCIβ
For provision secret using manifest, KubeRocketCI portal or with the externalSecrets operator:
- KubeRocketCI portal
- Manifests
- External Secrets Operator
Go to Portal -> Configuration -> ARTIFACTS STORAGE -> NEXUS. Update or click + ADD INTEGRATION fill the following fields and click the SAVE button:
- Quick link URL
https://nexus.example.com - URL
http://nexus.nexus:8081 - User
nexus-user-id - Password
nexus-user-password

apiVersion: v1
kind: Secret
metadata:
name: ci-nexus
namespace: krci
labels:
app.edp.epam.com/secret-type: nexus
app.edp.epam.com/integration-secret: "true"
type: Opaque
stringData:
url: https://nexus.example.com
username: <nexus-user-id>
password: <nexus-user-password>
"ci-nexus":
{
"url": "https://nexus.example.com",
"username": "XXXXXXX",
"password": "XXXXXXX"
},
Go to Portal -> Configuration -> ARTIFACTS STORAGE -> NEXUS and see Managed by External Secret message:

More detail of External Secrets Operator Integration can found on the following page