Repository: apache/camel-k
Pull request #4346 (2023-05-09 08:22:45)

chore(dep): Remove archived github.com/pkg/errors dependency
Ref #4326

## Motivation

The github.com/pkg/errors dependency has been archived and golang provides ways to replace it.

## Description

* process used: https://xdg.me/rewriting-go-with-ast-transformation/
* some helping tooling: https://github.com/xdg-go/go-rewrap-errors

Principal manual adaptations : k8serrors, errors.Cause

Note: It is still an sub-dependency from other projects.

<!--
Enter your extended release note in the below block. If the PR requires
additional action from users switching to the new release, include the string
"action required". If no release note is required, write "NONE". 

You can (optionally) mark this PR with labels "kind/bug" or "kind/feature" to make sure
the text is added to the right section of the release notes. 
-->

**Release Note**
```release-note
Remove archived github.com/pkg/errors as direct dependency
```



Patch:
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 8e733d681..968f0fa4b 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -6,6 +6,8 @@
 
 **Closed issues:**
 
+- High memory Quarkus native check failing [\#4345](https://github.com/apache/camel-k/issues/4345)
+- Binding from a Strimzi CR is not properly decoded [\#4336](https://github.com/apache/camel-k/issues/4336)
 - Native "higher memory" checks not running [\#4328](https://github.com/apache/camel-k/issues/4328)
 - TestKamelReset test flakiness [\#4316](https://github.com/apache/camel-k/issues/4316)
 - Cannot set GOMAXPROCS [\#4299](https://github.com/apache/camel-k/issues/4299)
diff --git a/addons/keda/keda.go b/addons/keda/keda.go
index b47ee4e89..8fa069c72 100644
--- a/addons/keda/keda.go
+++ b/addons/keda/keda.go
@@ -20,6 +20,7 @@ package keda
 import (
 	"bytes"
 	"encoding/json"
+	"errors"
 	"fmt"
 	"sort"
 	"strings"
@@ -37,7 +38,7 @@ import (
 	"github.com/apache/camel-k/v2/pkg/util/property"
 	"github.com/apache/camel-k/v2/pkg/util/source"
 	"github.com/apache/camel-k/v2/pkg/util/uri"
-	"github.com/pkg/errors"
+
 	autoscalingv1 "k8s.io/api/autoscaling/v1"
 	v1 "k8s.io/api/core/v1"
 	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
@@ -225,7 +226,7 @@ func (t *kedaTrait) addScalingResources(e *trait.Environment) error {
 				Name:      trigger.AuthenticationSecret,
 			}
 			if err := e.Client.Get(e.Ctx, key, &s); err != nil {
-				return errors.Wrapf(err, "could not load secret named %q in namespace %q", trigger.AuthenticationSecret, e.Integration.Namespace)
+				return fmt.Errorf("could not load secret named %q in namespace %q: %w", trigger.AuthenticationSecret, e.Integration.Namespace, err)
 			}
 			// Fill a TriggerAuthentication from the secret
 			triggerAuth := kedav1alpha1.TriggerAuthentication{
@@ -480,11 +481,11 @@ func (t *kedaTrait) evaluateTemplateParameters(e *trait.Environment, kamelet *ca
 	for param, expr := range paramTemplates {
 		tmpl, err := template.New(fmt.Sprintf("kamelet-param-%s", param)).Parse(expr)
 		if err != nil {
-			return nil, nil, errors.Wrapf(err, "invalid template for KEDA parameter %q: %q", param, expr)
+			return nil, nil, fmt.Errorf("invalid template for KEDA parameter %q: %q: %w", param, expr, err)
 		}
 		var buf bytes.Buffer
 		if err := tmpl.Execute(&buf, kameletPropValues); err != nil {
-			return nil, nil, errors.Wrapf(err, "unable to process template for KEDA parameter %q: %q", param, expr)
+			return nil, nil, fmt.Errorf("unable to process template for KEDA parameter %q: %q: %w", param, expr, err)
 		}
 		paramValues[param] = buf.String()
 	}
@@ -502,7 +503,7 @@ func (t *kedaTrait) getKameletPropertyValue(e *trait.Environment, kamelet *camel
 			if c.Type == "property" && strings.HasPrefix(c.Value, kameletSpecificKey) {
 				v, err := property.DecodePropertyFileValue(c.Value, kameletSpecificKey)
 				if err != nil {
-					return "", errors.Wrapf(err, "could not decode property %q", kameletSpecificKey)
+					return "", fmt.Errorf("could not decode property %q: %w", kameletSpecificKey, err)
 				}
 				return v, nil
 			}
@@ -522,7 +523,7 @@ func (t *kedaTrait) getKameletPropertyValue(e *trait.Environment, kamelet *camel
 			d := json.NewDecoder(bytes.NewReader(schema.Default.RawMessage))
 			d.UseNumber()
 			if err := d.Decode(&val); err != nil {
-				return "", errors.Wrapf(err, "cannot decode default value for property %q", prop)
+				return "", fmt.Errorf("cannot decode default value for property %q: %w", prop, err)
 			}
 			v := fmt.Sprintf("%v", val)
 			return v, nil
diff --git a/docs/modules/ROOT/partials/apis/camel-k-crds.adoc b/docs/modules/ROOT/partials/apis/camel-k-crds.adoc
index 4cbcfd037..05067c9cb 100644
--- a/docs/modules/ROOT/partials/apis/camel-k-crds.adoc
+++ b/docs/modules/ROOT/partials/apis/camel-k-crds.adoc
@@ -5522,9 +5522,9 @@ in order to save resources when the integration does not need to be executed.
 Integrations that start from the following components are evaluated by the cron trait: `timer`, `cron`, `quartz`.
 
 The rules for using a Kubernetes CronJob are the following:
-- `timer`: when periods can be written as cron expressions. E.g. `timer:tick?period=60000`.
-- `cron`, `quartz`: when the cron expression does not contain seconds (or the "seconds" part is set to 0). E.g.
-  `cron:tab?schedule=0/2$\{plus}*\{plus}*\{plus}*\{plus}?` or `quartz:trigger?cron=0\{plus}0/2\{plus}*\{plus}*\{plus}*\{plus}?`.
+  - `timer`: when periods can be written as cron expressions. E.g. `timer:tick?period=60000`.
+  - `cron`, `quartz`: when the cron expression does not contain seconds (or the "seconds" part is set to 0). E.g.
+    `cron:tab?schedule=0/2$\{plus}*\{plus}*\{plus}*\{plus}?` or `quartz:trigger?cron=0\{plus}0/2\{plus}*\{plus}*\{plus}*\{plus}?`.
 
 
 [cols="2,2a",options="header"]
diff --git a/docs/modules/traits/pages/cron.adoc b/docs/modules/traits/pages/cron.adoc
index 60d90f904..e7b2caa17 100755
--- a/docs/modules/traits/pages/cron.adoc
+++ b/docs/modules/traits/pages/cron.adoc
@@ -11,9 +11,9 @@ in order to save resources when the integration does not need to be executed.
 Integrations that start from the following components are evaluated by the cron trait: `timer`, `cron`, `quartz`.
 
 The rules for using a Kubernetes CronJob are the following:
-- `timer`: when periods can be written as cron expressions. E.g. `timer:tick?period=60000`.
-- `cron`, `quartz`: when the cron expression does not contain seconds (or the "seconds" part is set to 0). E.g.
-  `cron:tab?schedule=0/2${plus}*{plus}*{plus}*{plus}?` or `quartz:trigger?cron=0{plus}0/2{plus}*{plus}*{plus}*{plus}?`.
+  - `timer`: when periods can be written as cron expressions. E.g. `timer:tick?period=60000`.
+  - `cron`, `quartz`: when the cron expression does not contain seconds (or the "seconds" part is set to 0). E.g.
+    `cron:tab?schedule=0/2${plus}*{plus}*{plus}*{plus}?` or `quartz:trigger?cron=0{plus}0/2{plus}*{plus}*{plus}*{plus}?`.
 
 
 This trait is available in the following profiles: **Kubernetes, Knative, OpenShift**.
diff --git a/go.mod b/go.mod
index a6e80e270..406ef6374 100644
--- a/go.mod
+++ b/go.mod
@@ -7,7 +7,7 @@ require (
 	github.com/apache/camel-k/v2/pkg/apis/camel v0.0.0
 	github.com/apache/camel-k/v2/pkg/client/camel v0.0.0
 	github.com/apache/camel-k/v2/pkg/kamelet/repository v0.0.0
-	github.com/container-tools/spectrum v0.6.10
+	github.com/container-tools/spectrum v0.6.11
 	github.com/evanphx/json-patch v4.12.0+incompatible
 	github.com/fatih/camelcase v1.0.0
 	github.com/fatih/structs v1.1.0
@@ -25,7 +25,6 @@ require (
 	github.com/openshift/api v3.9.1-0.20190927182313-d4a64ec2cbd8+incompatible
 	github.com/operator-framework/api v0.13.0
 	github.com/otiai10/copy v1.9.0
-	github.com/pkg/errors v0.9.1
 	github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring v0.60.0
 	github.com/prometheus/client_golang v1.15.1
 	github.com/prometheus/client_model v0.4.0
@@ -45,9 +44,9 @@ require (
 	go.uber.org/automaxprocs v1.5.1
 	go.uber.org/multierr v1.9.0
 	go.uber.org/zap v1.24.0
-	golang.org/x/oauth2 v0.7.0
+	golang.org/x/oauth2 v0.8.0
 	golang.org/x/sync v0.1.0
-	golang.org/x/term v0.7.0
+	golang.org/x/term v0.8.0
 	golang.org/x/text v0.9.0
 	golang.org/x/time v0.1.0
 	gopkg.in/inf.v0 v0.9.1
@@ -93,7 +92,7 @@ require (
 	github.com/containerd/continuity v0.1.0 // indirect
 	github.com/containerd/stargz-snapshotter/estargz v0.14.1 // indirect
 	github.com/davecgh/go-spew v1.1.1 // indirect
-	github.com/docker/cli v23.0.5+incompatible // indirect
+	github.com/docker/cli v23.0.6+incompatible // indirect
 	github.com/docker/distribution v2.8.1+incompatible // indirect
 	github.com/docker/docker v23.0.3+incompatible // indirect
 	github.com/docker/docker-credential-helpers v0.7.0 // indirect
@@ -136,6 +135,7 @@ require (
 	github.com/opencontainers/image-spec v1.0.3-0.20220114050600-8b9d41f48198 // indirect
 	github.com/opencontainers/runc v1.0.2 // indirect
 	github.com/pelletier/go-toml/v2 v2.0.6 // indirect
+	github.com/pkg/errors v0.9.1 // indirect
 	github.com/pmezard/go-difflib v1.0.0 // indirect
 	github.com/prometheus/procfs v0.9.0 // indirect
 	github.com/prometheus/statsd_exporter v0.21.0 // indirect
@@ -151,8 +151,8 @@ require (
 	go.uber.org/atomic v1.9.0 // indirect
 	golang.org/x/crypto v0.0.0-20220525230936-793ad666bf5e // indirect
 	golang.org/x/mod v0.9.0 // indirect
-	golang.org/x/net v0.9.0 // indirect
-	golang.org/x/sys v0.7.0 // indirect
+	golang.org/x/net v0.10.0 // indirect
+	golang.org/x/sys v0.8.0 // indirect
 	golang.org/x/tools v0.7.0 // indirect
 	gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect
 	google.golang.org/api v0.107.0 // indirect
diff --git a/go.sum b/go.sum
index acd1eba9f..c362a348e 100644
--- a/go.sum
+++ b/go.sum
@@ -234,8 +234,8 @@ github.com/cockroachdb/errors v1.2.4/go.mod h1:rQD95gz6FARkaKkQXUksEje/d9a6wBJoC
 github.com/cockroachdb/logtags v0.0.0-20190617123548-eb05cc24525f/go.mod h1:i/u985jwjWRlyHXQbwatDASoW0RMlZ/3i9yJHE2xLkI=
 github.com/container-tools/go-containerregistry v0.7.1-0.20211124090132-40ccc94a466b h1:PnXGj/WjUnNI7O3AAjXIYs+8QXVRzgoxurEgVgsItrU=
 github.com/container-tools/go-containerregistry v0.7.1-0.20211124090132-40ccc94a466b/go.mod h1:6cMIl1RfryEiPzBE67OgtZdEiLWz4myqCQIiBMy3CsM=
-github.com/container-tools/spectrum v0.6.10 h1:2Y3gY0qixeCfW34Kij1mgtqt/Xyc2lSmEG7UIIcp7x8=
-github.com/container-tools/spectrum v0.6.10/go.mod h1:LgoHcknbRBNbs+yT43ooAT9BTdNTkFen1Foq/ppvSAs=
+github.com/container-tools/spectrum v0.6.11 h1:FN7xQBm/zgQ78rclhmsqHexFgx7zTu2NGJZdRPOvsDY=
+github.com/container-tools/spectrum v0.6.11/go.mod h1:F8zfLpjuQNRUFJhIDrL2a1fuR7L32iIc29ybBLriBFM=
 github.com/containerd/aufs v0.0.0-20200908144142-dab0cbea06f4/go.mod h1:nukgQABAEopAHvB6j7cnP5zJ+/3aVcE7hCYqvIwAHyE=
 github.com/containerd/aufs v0.0.0-20201003224125-76a6863f2989/go.mod h1:AkGGQs9NM2vtYHaUen+NljV0/baGCAPELGm2q9ZXpWU=
 github.com/containerd/aufs v0.0.0-20210316121734-20793ff83c97/go.mod h1:kL5kd6KM5TzQjR79jljyi4olc1Vrx6XBlcyj3gNv2PU=
@@ -367,8 +367,8 @@ github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZm
 github.com/dgryski/go-sip13 v0.0.0-20181026042036-e10d5fee7954/go.mod h1:vAd38F8PWV+bWy6jNmig1y/TA+kYO4g3RSRF0IAv0no=
 github.com/dnaeon/go-vcr v1.0.1/go.mod h1:aBB1+wY4s93YsC3HHjMBMrwTj2R9FHDzUr9KyGc8n1E=
 github.com/docker/cli v20.10.11+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8=
-github.com/docker/cli v23.0.5+incompatible h1:ufWmAOuD3Vmr7JP2G5K3cyuNC4YZWiAsuDEvFVVDafE=
-github.com/docker/cli v23.0.5+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8=
+github.com/docker/cli v23.0.6+incompatible h1:CScadyCJ2ZKUDpAMZta6vK8I+6/m60VIjGIV7Wg/Eu4=
+github.com/docker/cli v23.0.6+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8=
 github.com/docker/distribution v0.0.0-20190905152932-14b96e55d84c/go.mod h1:0+TTO4EOBfRPhZXAeF1Vu+W3hHZ8eLp8PgKVZlcvtFY=
 github.com/docker/distribution v2.7.1-0.20190205005809-0d3efadf0154+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w=
 github.com/docker/distribution v2.7.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w=
@@ -1458,8 +1458,8 @@ golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qx
 golang.org/x/net v0.0.0-20210825183410-e898025ed96a/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
 golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
 golang.org/x/net v0.0.0-20211118161319-6a13c67c3ce4/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
-golang.org/x/net v0.9.0 h1:aWJ/m6xSmxWBx+V0XRHTlrYrPG56jKsLdTFmsSsCzOM=
-golang.org/x/net v0.9.0/go.mod h1:d48xBJpPfHeWQsugry2m+kC02ZBRGRgulfHnEXEuWns=
+golang.org/x/net v0.10.0 h1:X2//UzNDwYmtCLn7To6G58Wr6f5ahEAQgKNzv9Y951M=
+golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg=
 golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
 golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
 golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
@@ -1477,8 +1477,8 @@ golang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914/go.mod h1:KelEdhl1UZF7XfJ
 golang.org/x/oauth2 v0.0.0-20210805134026-6f1e6394065a/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
 golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
 golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
-golang.org/x/oauth2 v0.7.0 h1:qe6s0zUXlPX80/dITx3440hWZ7GwMwgDDyrSGTPJG/g=
-golang.org/x/oauth2 v0.7.0/go.mod h1:hPLQkd9LyjfXTiRohC/41GhcFqxisoUQ99sCUOHO9x4=
+golang.org/x/oauth2 v0.8.0 h1:6dkIjl3j3LtZ/O3sTgZTMsLKSftL/B8Zgq4huOIIUu8=
+golang.org/x/oauth2 v0.8.0/go.mod h1:yr7u4HXZRm1R1kBWqr/xKNqewf0plRYoB7sla+BCIXE=
 golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
 golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
 golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
@@ -1607,13 +1607,13 @@ golang.org/x/sys v0.0.0-20211013075003-97ac67df715c/go.mod h1:oPkhp1MJrh7nUepCBc
 golang.org/x/sys v0.0.0-20211117180635-dee7805ff2e1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
 golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
 golang.org/x/sys v0.0.0-20220908164124-27713097b956/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.7.0 h1:3jlCCIQZPdOYu1h8BkNvLz8Kgwtae2cagcG/VamtZRU=
-golang.org/x/sys v0.7.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.8.0 h1:EBmGv8NaZBZTWvrbjNoL6HVt+IVy3QDQpJs7VRIw3tU=
+golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
 golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
 golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
 golang.org/x/term v0.0.0-20210220032956-6a3ed077a48d/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
-golang.org/x/term v0.7.0 h1:BEvjmm5fURWqcfbSKTdpkDXYBrUS1c0m8agp14W48vQ=
-golang.org/x/term v0.7.0/go.mod h1:P32HKFT3hSsZrRxla30E9HqToFYAQPCMs/zFMBUFqPY=
+golang.org/x/term v0.8.0 h1:n5xxQn2i3PC0yLAbjTpNT85q/Kgzcr2gIoX9OrJUols=
+golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo=
 golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
 golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
 golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
diff --git a/pkg/apis/camel/v1/trait/cron.go b/pkg/apis/camel/v1/trait/cron.go
index 67e8cb749..cb6c8582d 100644
--- a/pkg/apis/camel/v1/trait/cron.go
+++ b/pkg/apis/camel/v1/trait/cron.go
@@ -27,9 +27,9 @@ package trait
 // Integrations that start from the following components are evaluated by the cron trait: `timer`, `cron`, `quartz`.
 //
 // The rules for using a Kubernetes CronJob are the following:
-// - `timer`: when periods can be written as cron expressions. E.g. `timer:tick?period=60000`.
-// - `cron`, `quartz`: when the cron expression does not contain seconds (or the "seconds" part is set to 0). E.g.
-//   `cron:tab?schedule=0/2${plus}*{plus}*{plus}*{plus}?` or `quartz:trigger?cron=0{plus}0/2{plus}*{plus}*{plus}*{plus}?`.
+//   - `timer`: when periods can be written as cron expressions. E.g. `timer:tick?period=60000`.
+//   - `cron`, `quartz`: when the cron expression does not contain seconds (or the "seconds" part is set to 0). E.g.
+//     `cron:tab?schedule=0/2${plus}*{plus}*{plus}*{plus}?` or `quartz:trigger?cron=0{plus}0/2{plus}*{plus}*{plus}*{plus}?`.
 //
 // +camel-k:trait=cron.
 type CronTrait struct {
diff --git a/pkg/builder/quarkus.go b/pkg/builder/quarkus.go
index 8a1190757..85fcd92b5 100644
--- a/pkg/builder/quarkus.go
+++ b/pkg/builder/quarkus.go
@@ -24,8 +24,6 @@ import (
 	"path/filepath"
 	"strings"
 
-	"github.com/pkg/errors"
-
 	v1 "github.com/apache/camel-k/v2/pkg/apis/camel/v1"
 	"github.com/apache/camel-k/v2/pkg/util/camel"
 	"github.com/apache/camel-k/v2/pkg/util/defaults"
@@ -87,7 +85,7 @@ func prepareProjectWithSources(ctx *builderContext) error {
 	}
 	sourcesPath := filepath.Join(ctx.Path, "maven", "src", "main", "resources", "routes")
 	if err := os.MkdirAll(sourcesPath, os.ModePerm); err != nil {
-		return errors.Wrap(err, "failure while creating resource folder")
+		return fmt.Errorf("failure while creating resource folder: %w", err)
 	}
 
 	sourceList := ""
@@ -97,14 +95,14 @@ func prepareProjectWithSources(ctx *builderContext) error {
 		}
 		sourceList += "classpath:routes/" + source.Name
 		if err := os.WriteFile(filepath.Join(sourcesPath, source.Name), []byte(source.Content), os.ModePerm); err != nil {
-			return errors.Wrapf(err, "failure while writing %s", source.Name)
+			return fmt.Errorf("failure while writing %s: %w", source.Name, err)
 		}
 	}
 
 	if sourceList != "" {
 		routesIncludedPattern := "camel.main.routes-include-pattern = " + sourceList
 		if err := os.WriteFile(filepath.Join(filepath.Dir(sourcesPath), "application.properties"), []byte(routesIncludedPattern), os.ModePerm); err != nil {
-			return errors.Wrapf(err, "failure while writing the configuration application.properties")
+			return fmt.Errorf("failure while writing the configuration application.properties: %w", err)
 		}
 	}
 	return nil
@@ -239,7 +237,7 @@ func buildQuarkusRunner(ctx *builderContext) error {
 func BuildQuarkusRunnerCommon(ctx context.Context, mc maven.Context, project maven.Project) error {
 	resourcesPath := filepath.Join(mc.Path, "src", "main", "resources")
 	if err := os.MkdirAll(resourcesPath, os.ModePerm); err != nil {
-		return errors.Wrap(err, "failure while creating resource folder")
+		return fmt.Errorf("failure while creating resource folder: %w", err)
 	}
 
 	// Generate an empty application.properties so that there will be something in
@@ -248,14 +246,14 @@ func BuildQuarkusRunnerCommon(ctx context.Context, mc maven.Context, project mav
 	// In the future there should be a way to provide build information from secrets,
 	// configmap, etc.
 	if _, err := os.OpenFile(filepath.Join(resourcesPath, "application.properties"), os.O_RDWR|os.O_CREATE, 0666); err != nil {
-		return errors.Wrap(err, "failure while creating application.properties")
+		return fmt.Errorf("failure while creating application.properties: %w", err)
 	}
 
 	mc.AddArgument("package")
 
 	// Run the Maven goal
 	if err := project.Command(mc).Do(ctx); err != nil {
-		return errors.Wrap(err, "failure while building project")
+		return fmt.Errorf("failure while building project: %w", err)
 	}
 
 	return nil
diff --git a/pkg/builder/s2i.go b/pkg/builder/s2i.go
index 2e1c9ed32..99cbd00ea 100644
--- a/pkg/builder/s2i.go
+++ b/pkg/builder/s2i.go
@@ -23,6 +23,7 @@ import (
 	"compress/gzip"
 	"context"
 	"encoding/json"
+	"errors"
 	"fmt"
 	"io"
 	"os"
@@ -41,8 +42,6 @@ import (
 	"sigs.k8s.io/controller-runtime/pkg/client/apiutil"
 	ctrlutil "sigs.k8s.io/controller-runtime/pkg/controller/controllerutil"
 
-	"github.com/pkg/errors"
-
 	buildv1 "github.com/openshift/api/build/v1"
 	imagev1 "github.com/openshift/api/image/v1"
 
@@ -93,7 +92,7 @@ func (t *s2iTask) Do(ctx context.Context) v1.BuildStatus {
 
 	err := t.c.Delete(ctx, bc)
 	if err != nil && !apierrors.IsNotFound(err) {
-		return status.Failed(errors.Wrap(err, "cannot delete build config"))
+		return status.Failed(fmt.Errorf("cannot delete build config: %w", err))
 	}
 
 	// Set the build controller as owner reference
@@ -104,12 +103,12 @@ func (t *s2iTask) Do(ctx context.Context) v1.BuildStatus {
 	}
 
 	if err := ctrlutil.SetOwnerReference(owner, bc, t.c.GetScheme()); err != nil {
-		return status.Failed(errors.Wrapf(err, "cannot set owner reference on BuildConfig: %s", bc.Name))
+		return status.Failed(fmt.Errorf("cannot set owner reference on BuildConfig: %s: %w", bc.Name, err))
 	}
 
 	err = t.c.Create(ctx, bc)
 	if err != nil {
-		return status.Failed(errors.Wrap(err, "cannot create build config"))
+		return status.Failed(fmt.Errorf("cannot create build config: %w", err))
 	}
 
 	is := &imagev1.ImageStream{
@@ -131,16 +130,16 @@ func (t *s2iTask) Do(ctx context.Context) v1.BuildStatus {
 
 	err = t.c.Delete(ctx, is)
 	if err != nil && !apierrors.IsNotFound(err) {
-		return status.Failed(errors.Wrap(err, "cannot delete image stream"))
+		return status.Failed(fmt.Errorf("cannot delete image stream: %w", err))
 	}
 
 	if err := ctrlutil.SetOwnerReference(owner, is, t.c.GetScheme()); err != nil {
-		return status.Failed(errors.Wrapf(err, "cannot set owner reference on ImageStream: %s", is.Name))
+		return status.Failed(fmt.Errorf("cannot set owner reference on ImageStream: %s: %w", is.Name, err))
 	}
 
 	err = t.c.Create(ctx, is)
 	if err != nil {
-		return status.Failed(errors.Wrap(err, "cannot create image stream"))
+		return status.Failed(fmt.Errorf("cannot create image stream: %w", err))
 	}
 
 	err = util.WithTempDir(t.build.Name+"-s2i-", func(tmpDir string) error {
@@ -161,12 +160,12 @@ func (t *s2iTask) Do(ctx context.Context) v1.BuildStatus {
 
 		archiveFile, err := os.Create(archive)
 		if err != nil {
-			return errors.Wrap(err, "cannot create tar archive")
+			return fmt.Errorf("cannot create tar archive: %w", err)
 		}
 
 		err = tarDir(contextDir, archiveFile)
 		if err != nil {
-			return errors.Wrap(err, "cannot tar context directory")
+			return fmt.Errorf("cannot tar context directory: %w", err)
 		}
 
 		f, err := util.Open(archive)
@@ -190,18 +189,18 @@ func (t *s2iTask) Do(ctx context.Context) v1.BuildStatus {
 			Do(ctx)
 
 		if r.Error() != nil {
-			return errors.Wrap(r.Error(), "cannot instantiate binary")
+			return fmt.Errorf("cannot instantiate binary: %w", r.Error())
 		}
 
 		data, err := r.Raw()
 		if err != nil {
-			return errors.Wrap(err, "no raw data retrieved")
+			return fmt.Errorf("no raw data retrieved: %w", err)
 		}
 
 		s2iBuild := buildv1.Build{}
 		err = json.Unmarshal(data, &s2iBuild)
 		if err != nil {
-			return errors.Wrap(err, "cannot unmarshal instantiated binary response")
+			return fmt.Errorf("cannot unmarshal instantiated binary response: %w", err)
 		}
 
 		err = t.waitForS2iBuildCompletion(ctx, t.c, &s2iBuild)
diff --git a/pkg/client/apply.go b/pkg/client/apply.go
index abbd9d221..7fe872e84 100644
--- a/pkg/client/apply.go
+++ b/pkg/client/apply.go
@@ -19,6 +19,7 @@ package client
 
 import (
 	"context"
+	"errors"
 	"fmt"
 	"net/http"
 	"strings"
@@ -27,7 +28,7 @@ import (
 
 	"github.com/apache/camel-k/v2/pkg/util/log"
 	"github.com/apache/camel-k/v2/pkg/util/patch"
-	"github.com/pkg/errors"
+
 	k8serrors "k8s.io/apimachinery/pkg/api/errors"
 	"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
 	"k8s.io/apimachinery/pkg/runtime"
diff --git a/pkg/client/client.go b/pkg/client/client.go
index 08282f274..c288e655b 100644
--- a/pkg/client/client.go
+++ b/pkg/client/client.go
@@ -18,12 +18,13 @@ limitations under the License.
 package client
 
 import (
+	"errors"
 	"fmt"
 	"os"
 	"path/filepath"
 
 	user "github.com/mitchellh/go-homedir"
-	"github.com/pkg/errors"
+
 	"github.com/sirupsen/logrus"
 	"k8s.io/client-go/scale"
 
diff --git a/pkg/cmd/debug.go b/pkg/cmd/debug.go
index de224b4da..214b2dad6 100644
--- a/pkg/cmd/debug.go
+++ b/pkg/cmd/debug.go
@@ -18,6 +18,7 @@ limitations under the License.
 package cmd
 
 import (
+	"errors"
 	"fmt"
 	"os"
 	"os/signal"
@@ -28,7 +29,7 @@ import (
 	camelv1 "github.com/apache/camel-k/v2/pkg/client/camel/clientset/versioned/typed/camel/v1"
 	"github.com/apache/camel-k/v2/pkg/util/kubernetes"
 	k8slog "github.com/apache/camel-k/v2/pkg/util/kubernetes/log"
-	"github.com/pkg/errors"
+
 	"github.com/spf13/cobra"
 	k8serrors "k8s.io/apimachinery/pkg/api/errors"
 	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
diff --git a/pkg/cmd/install.go b/pkg/cmd/install.go
index 616f0ec6f..faafc2364 100644
--- a/pkg/cmd/install.go
+++ b/pkg/cmd/install.go
@@ -19,6 +19,7 @@ package cmd
 
 import (
 	"context"
+	"errors"
 	"fmt"
 	"io"
 	"os"
@@ -28,7 +29,7 @@ import (
 	"time"
 
 	platformutil "github.com/apache/camel-k/v2/pkg/platform"
-	"github.com/pkg/errors"
+
 	"github.com/spf13/cobra"
 	"github.com/spf13/viper"
 
@@ -72,7 +73,7 @@ func newCmdInstall(rootCmdOptions *RootCmdOptions) (*cobra.Command, *installCmdO
 			}
 			if err := options.install(cmd, args); err != nil {
 				if k8serrors.IsAlreadyExists(err) {
-					return errors.Wrap(err, "Camel K seems already installed (use the --force option to overwrite existing resources)")
+					return fmt.Errorf("camel K seems already installed (use the --force option to overwrite existing resources): %w", err)
 				}
 				return err
 			}
@@ -283,8 +284,8 @@ func (o *installCmdOptions) tryInstallViaOLM(
 		return false, err
 	}
 	if olmAvailable, err := olm.IsAPIAvailable(o.Context, olmClient, o.Namespace); err != nil {
-		return false, errors.Wrap(err,
-			"error while checking OLM availability. Run with '--olm=false' to skip this check")
+		return false, fmt.Errorf("error while checking OLM availability. Run with '--olm=false' to skip this check: %w", err)
+
 	} else if !olmAvailable {
 		fmt.Fprintln(cmd.OutOrStdout(), "OLM is not available in the cluster. Fallback to regular installation.")
 		return false, nil
@@ -292,13 +293,13 @@ func (o *installCmdOptions) tryInstallViaOLM(
 
 	if hasPermission, err := olm.HasPermissionToInstall(o.Context, olmClient,
 		o.Namespace, o.Global, o.olmOptions); err != nil {
-		return false, errors.Wrap(err,
-			"error while checking permissions to install operator via OLM. Run with '--olm=false' to skip this check")
+		return false, fmt.Errorf("error while checking permissions to install operator via OLM. Run with '--olm=false' to skip this check: %w", err)
+
 	} else if !hasPermission {
 		return false, errors.New(
 			"OLM is available but current user has not enough permissions to create the operator. " +
 				"You can either ask your administrator to provide permissions (preferred) " +
-				"or run the install command with the '--olm=false' flag.")
+				"or run the install command with the '--olm=false' flag")
 	}
 
 	// Install or collect via OLM
@@ -605,7 +606,7 @@ func (o *installCmdOptions) setupIntegrationPlatform(
 	}
 
 	if err := install.IntegrationPlatformViewerRole(o.Context, c, namespace); err != nil && !k8serrors.IsAlreadyExists(err) {
-		return nil, errors.Wrap(err, "Error while installing global IntegrationPlatform viewer role")
+		return nil, fmt.Errorf("error while installing global IntegrationPlatform viewer role: %w", err)
 	}
 
 	if o.ExampleSetup {
@@ -743,7 +744,7 @@ func (o *installCmdOptions) validate(_ *cobra.Command, _ []string) error {
 		if err != nil {
 			result = multierr.Append(result, err)
 		} else if nfo.IsDir() {
-			result = multierr.Append(result, errors.Wrapf(err, "registry file cannot be a directory: %s", o.RegistryAuthFile))
+			result = multierr.Append(result, fmt.Errorf("registry file cannot be a directory: %s: %w", o.RegistryAuthFile, err))
 		}
 	}
 
@@ -902,7 +903,7 @@ func createDefaultMavenSettingsConfigMap(ctx context.Context, client client.Clie
 		} else if len(p) != 0 {
 			err = client.Patch(ctx, cm, ctrl.RawPatch(types.MergePatchType, p))
 			if err != nil {
-				return errors.Wrap(err, "error during patch resource")
+				return fmt.Errorf("error during patch resource: %w", err)
 			}
 		}
 	}
diff --git a/pkg/cmd/local/container.go b/pkg/cmd/local/container.go
index 624a57c36..12ab06b93 100644
--- a/pkg/cmd/local/container.go
+++ b/pkg/cmd/local/container.go
@@ -19,6 +19,7 @@ package local
 
 import (
 	"context"
+	"errors"
 	"fmt"
 	"io"
 	"os"
@@ -29,7 +30,6 @@ import (
 
 	"github.com/apache/camel-k/v2/pkg/util"
 	"github.com/apache/camel-k/v2/pkg/util/docker"
-	"github.com/pkg/errors"
 )
 
 // Local Docker file system management functions.
@@ -110,7 +110,7 @@ func buildBaseImage(ctx context.Context, stdout, stderr io.Writer) error {
 
 	// Run the command.
 	if err := cmd.Run(); err != nil {
-		return errors.Errorf("base image containerization did not run successfully: %v", err)
+		return fmt.Errorf("base image containerization did not run successfully: %w", err)
 	}
 
 	return nil
@@ -206,7 +206,7 @@ func buildIntegrationImage(ctx context.Context, image string, stdout, stderr io.
 
 	// Run the command.
 	if err := cmd.Run(); err != nil {
-		return errors.Errorf("integration image containerization did not run successfully: %v", err)
+		return fmt.Errorf("integration image containerization did not run successfully: %w", err)
 	}
 
 	return nil
@@ -239,7 +239,7 @@ func RunIntegrationImage(ctx context.Context, image string, stdout, stderr io.Wr
 
 	// Run the command.
 	if err := cmd.Run(); err != nil {
-		return errors.Errorf("integration image did not run successfully: %v", err)
+		return fmt.Errorf("integration image did not run successfully: %w", err)
 	}
 
 	return nil
diff --git a/pkg/cmd/local/local.go b/pkg/cmd/local/local.go
index b347e2031..ed2664353 100644
--- a/pkg/cmd/local/local.go
+++ b/pkg/cmd/local/local.go
@@ -20,13 +20,13 @@ package local
 import (
 	"context"
 	"encoding/json"
+	"errors"
 	"fmt"
 	"os"
 	"path/filepath"
 	"sort"
 	"strings"
 
-	"github.com/pkg/errors"
 	"github.com/scylladb/go-set/strset"
 	"github.com/spf13/cobra"
 
@@ -52,7 +52,7 @@ func GetDependencies(ctx context.Context, cmd *cobra.Command, srcs, userDependen
 	// Fetch existing catalog or create new one if one does not already exist
 	catalog, err := CreateCamelCatalog(ctx)
 	if err != nil {
-		return nil, errors.Wrap(err, "failed to create Camel catalog")
+		return nil, fmt.Errorf("failed to create Camel catalog: %w", err)
 	}
 
 	// Validate user-provided dependencies against Camel catalog
@@ -61,7 +61,7 @@ func GetDependencies(ctx context.Context, cmd *cobra.Command, srcs, userDependen
 	// Get top-level dependencies from sources
 	dependencies, err := getTopLevelDependencies(ctx, catalog, srcs)
 	if err != nil {
-		return nil, errors.Wrap(err, "failed to resolve dependencies from source")
+		return nil, fmt.Errorf("failed to resolve dependencies from source: %w", err)
 	}
 
 	// Add additional user-provided dependencies
@@ -77,7 +77,7 @@ func GetDependencies(ctx context.Context, cmd *cobra.Command, srcs, userDependen
 
 		dependencies, err = getTransitiveDependencies(ctx, catalog, dependencies, repositories)
 		if err != nil {
-			return nil, errors.Wrap(err, "failed to compute transitive dependencies")
+			return nil, fmt.Errorf("failed to compute transitive dependencies: %w", err)
 		}
 	}
 
@@ -278,7 +278,7 @@ func printDependencies(format string, dependencies []string, cmd *cobra.Command)
 		}
 		fmt.Fprint(cmd.OutOrStdout(), string(data))
 	default:
-		return errors.Errorf("unknown output format: %s", format)
+		return fmt.Errorf("unknown output format: %s", format)
 	}
 	return nil
 }
@@ -353,7 +353,7 @@ func validatePropertyFile(fileName string) error {
 	}
 
 	if file, err := os.Stat(fileName); err != nil {
-		return errors.Wrapf(err, "unable to access property file %s", fileName)
+		return fmt.Errorf("unable to access property file %s: %w", fileName, err)
 	} else if file.IsDir() {
 		return fmt.Errorf("property file %s is a directory", fileName)
 	}
diff --git a/pkg/cmd/local_build.go b/pkg/cmd/local_build.go
index bbed644ae..ef6136cc7 100644
--- a/pkg/cmd/local_build.go
+++ b/pkg/cmd/local_build.go
@@ -18,9 +18,9 @@ limitations under the License.
 package cmd
 
 import (
+	"errors"
 	"fmt"
 
-	"github.com/pkg/errors"
 	"github.com/spf13/cobra"
 
 	"github.com/apache/camel-k/v2/pkg/cmd/local"
diff --git a/pkg/cmd/local_run.go b/pkg/cmd/local_run.go
index 02dc1ded4..ac572b752 100644
--- a/pkg/cmd/local_run.go
+++ b/pkg/cmd/local_run.go
@@ -18,6 +18,7 @@ limitations under the License.
 package cmd
 
 import (
+	"errors"
 	"fmt"
 	"os"
 	"os/signal"
@@ -25,7 +26,7 @@ import (
 
 	"github.com/apache/camel-k/v2/pkg/cmd/local"
 	"github.com/apache/camel-k/v2/pkg/util"
-	"github.com/pkg/errors"
+
 	"github.com/spf13/cobra"
 )
 
@@ -123,7 +124,7 @@ func (o *localRunCmdOptions) validate(args []string) error {
 		if ok, err := util.DirectoryExists(o.IntegrationDirectory); err != nil {
 			return err
 		} else if !ok {
-			return errors.Errorf("integration directory %q does not exist", o.IntegrationDirectory)
+			return fmt.Errorf("integration directory %q does not exist", o.IntegrationDirectory)
 		}
 	}
 
diff --git a/pkg/cmd/modeline.go b/pkg/cmd/modeline.go
index 159847489..00a3585ca 100644
--- a/pkg/cmd/modeline.go
+++ b/pkg/cmd/modeline.go
@@ -19,6 +19,7 @@ package cmd
 
 import (
 	"context"
+	"errors"
 	"fmt"
 	"path/filepath"
 	"strings"
@@ -26,7 +27,7 @@ import (
 	"github.com/apache/camel-k/v2/pkg/cmd/source"
 	"github.com/apache/camel-k/v2/pkg/util"
 	"github.com/apache/camel-k/v2/pkg/util/modeline"
-	"github.com/pkg/errors"
+
 	"github.com/spf13/cobra"
 	"github.com/spf13/pflag"
 )
@@ -129,7 +130,7 @@ func createKamelWithModelineCommand(ctx context.Context, args []string) (*cobra.
 
 	opts, err := extractModelineOptions(ctx, files, rootCmd)
 	if err != nil {
-		return rootCmd, nil, errors.Wrap(err, "cannot read sources")
+		return rootCmd, nil, fmt.Errorf("cannot read sources: %w", err)
 	}
 
 	// Extract list of property/trait names already specified by the user.
@@ -196,7 +197,7 @@ func extractModelineOptions(ctx context.Context, sources []string, cmd *cobra.Co
 
 	resolvedSources, err := source.Resolve(ctx, sources, false, cmd)
 	if err != nil {
-		return opts, errors.Wrap(err, "failed to resolve sources")
+		return opts, fmt.Errorf("failed to resolve sources: %w", err)
 	}
 
 	for _, resolvedSource := range resolvedSources {
@@ -219,7 +220,7 @@ func extractModelineOptions(ctx context.Context, sources []string, cmd *cobra.Co
 func extractModelineOptionsFromSource(resolvedSource source.Source) ([]modeline.Option, error) {
 	ops, err := modeline.Parse(resolvedSource.Name, resolvedSource.Content)
 	if err != nil {
-		return ops, errors.Wrapf(err, "cannot process file %s", resolvedSource.Location)
+		return ops, fmt.Errorf("cannot process file %s: %w", resolvedSource.Location, err)
 	}
 	for i, o := range ops {
 		if disallowedOptions[o.Name] {
diff --git a/pkg/cmd/operator/operator.go b/pkg/cmd/operator/operator.go
index b1f1623c4..fff5a04aa 100644
--- a/pkg/cmd/operator/operator.go
+++ b/pkg/cmd/operator/operator.go
@@ -29,7 +29,6 @@ import (
 	"strings"
 	"time"
 
-	"github.com/pkg/errors"
 	"k8s.io/klog/v2"
 
 	"go.uber.org/automaxprocs/maxprocs"
@@ -271,7 +270,7 @@ func findOrCreateIntegrationPlatform(ctx context.Context, c client.Client, opera
 
 		// Make sure that IntegrationPlatform installed in operator namespace can be seen by others
 		if err := install.IntegrationPlatformViewerRole(ctx, c, operatorNamespace); err != nil && !k8serrors.IsAlreadyExists(err) {
-			return errors.Wrap(err, "Error while installing global IntegrationPlatform viewer role")
+			return fmt.Errorf("error while installing global IntegrationPlatform viewer role: %w", err)
 		}
 	} else {
 		return err
diff --git a/pkg/cmd/promote.go b/pkg/cmd/promote.go
index 6a0e238e4..a20731217 100644
--- a/pkg/cmd/promote.go
+++ b/pkg/cmd/promote.go
@@ -19,13 +19,12 @@ package cmd
 
 import (
 	"context"
+	"errors"
 	"fmt"
 	"reflect"
 	"regexp"
 	"strings"
 
-	"github.com/pkg/errors"
-
 	v1 "github.com/apache/camel-k/v2/pkg/apis/camel/v1"
 	traitv1 "github.com/apache/camel-k/v2/pkg/apis/camel/v1/trait"
 	"github.com/apache/camel-k/v2/pkg/client"
@@ -87,41 +86,41 @@ func (o *promoteCmdOptions) run(cmd *cobra.Command, args []string) error {
 	name := args[0]
 	c, err := o.GetCmdClient()
 	if err != nil {
-		return errors.Wrap(err, "could not retrieve cluster client")
+		return fmt.Errorf("could not retrieve cluster client: %w", err)
 	}
 	opSource, err := operatorInfo(o.Context, c, o.Namespace)
 	if err != nil {
-		return errors.Wrap(err, "could not retrieve info for Camel K operator source")
+		return fmt.Errorf("could not retrieve info for Camel K operator source: %w", err)
 	}
 	opDest, err := operatorInfo(o.Context, c, o.To)
 	if err != nil {
-		return errors.Wrap(err, "could not retrieve info for Camel K operator destination")
+		return fmt.Errorf("could not retrieve info for Camel K operator destination: %w", err)
 	}
 
 	err = checkOpsCompatibility(cmd, opSource, opDest)
 	if err != nil {
-		return errors.Wrap(err, "could not verify operators compatibility")
+		return fmt.Errorf("could not verify operators compatibility: %w", err)
 	}
 	promotePipe := false
 	var sourceIntegration *v1.Integration
 	// We first look if a Pipe with the name exists
 	sourcePipe, err := o.getPipe(c, name)
 	if err != nil && !k8serrors.IsNotFound(err) {
-		return errors.Wrap(err, "problems looking for Pipe "+name)
+		return fmt.Errorf("problems looking for Pipe "+name+": %w", err)
 	}
 	if sourcePipe != nil {
 		promotePipe = true
 	}
 	sourceIntegration, err = o.getIntegration(c, name)
 	if err != nil {
-		return errors.Wrap(err, "could not get Integration "+name)
+		return fmt.Errorf("could not get Integration "+name+": %w", err)
 	}
 	if sourceIntegration.Status.Phase != v1.IntegrationPhaseRunning {
 		return fmt.Errorf("could not promote an Integration in %s status", sourceIntegration.Status.Phase)
 	}
 	err = o.validateDestResources(c, sourceIntegration)
 	if err != nil {
-		return errors.Wrap(err, "could not validate destination resources")
+		return fmt.Errorf("could not validate destination resources: %w", err)
 	}
 
 	// Pipe promotion
diff --git a/pkg/cmd/rebuild.go b/pkg/cmd/rebuild.go
index 5b30d158d..d249982b1 100644
--- a/pkg/cmd/rebuild.go
+++ b/pkg/cmd/rebuild.go
@@ -18,9 +18,9 @@ limitations under the License.
 package cmd
 
 import (
+	"errors"
 	"fmt"
 
-	"github.com/pkg/errors"
 	"github.com/spf13/cobra"
 
 	k8sclient "sigs.k8s.io/controller-runtime/pkg/client"
@@ -94,7 +94,7 @@ func (o *rebuildCmdOptions) run(cmd *cobra.Command, args []string) error {
 func (o *rebuildCmdOptions) listAllIntegrations(c client.Client) ([]v1.Integration, error) {
 	list := v1.NewIntegrationList()
 	if err := c.List(o.Context, &list, k8sclient.InNamespace(o.Namespace)); err != nil {
-		return nil, errors.Wrap(err, fmt.Sprintf("could not retrieve integrations from namespace %s", o.Namespace))
+		return nil, fmt.Errorf("could not retrieve integrations from namespace %s: %w", o.Namespace, err)
 	}
 	return list.Items, nil
 }
@@ -108,7 +108,7 @@ func (o *rebuildCmdOptions) getIntegrations(c client.Client, names []string) ([]
 			Namespace: o.Namespace,
 		}
 		if err := c.Get(o.Context, key, &it); err != nil {
-			return nil, errors.Wrap(err, fmt.Sprintf("could not find integration %s in namespace %s", it.Name, o.Namespace))
+			return nil, fmt.Errorf("could not find integration %s in namespace %s: %w", it.Name, o.Namespace, err)
 		}
 		ints = append(ints, it)
 	}
@@ -120,7 +120,7 @@ func (o *rebuildCmdOptions) rebuildIntegrations(c k8sclient.StatusClient, integr
 		it := i
 		it.Status = v1.IntegrationStatus{}
 		if err := c.Status().Update(o.Context, &it); err != nil {
-			return errors.Wrap(err, fmt.Sprintf("could not rebuild integration %s in namespace %s", it.Name, o.Namespace))
+			return fmt.Errorf("could not rebuild integration %s in namespace %s: %w", it.Name, o.Namespace, err)
 		}
 	}
 	return nil
diff --git a/pkg/cmd/reset.go b/pkg/cmd/reset.go
index 8f08dd0ad..f09062622 100644
--- a/pkg/cmd/reset.go
+++ b/pkg/cmd/reset.go
@@ -18,12 +18,13 @@ limitations under the License.
 package cmd
 
 import (
+	"errors"
 	"fmt"
 
 	v1 "github.com/apache/camel-k/v2/pkg/apis/camel/v1"
 	"github.com/apache/camel-k/v2/pkg/apis/camel/v1alpha1"
 	"github.com/apache/camel-k/v2/pkg/client"
-	"github.com/pkg/errors"
+
 	"github.com/spf13/cobra"
 	"k8s.io/apimachinery/pkg/runtime/schema"
 	k8sclient "sigs.k8s.io/controller-runtime/pkg/client"
@@ -104,7 +105,7 @@ func (o *resetCmdOptions) reset(cmd *cobra.Command, _ []string) {
 func (o *resetCmdOptions) deleteAllIntegrations(c client.Client) (int, error) {
 	list := v1.NewIntegrationList()
 	if err := c.List(o.Context, &list, k8sclient.InNamespace(o.Namespace)); err != nil {
-		return 0, errors.Wrap(err, fmt.Sprintf("could not retrieve integrations from namespace %s", o.Namespace))
+		return 0, fmt.Errorf("could not retrieve integrations from namespace %s: %w", o.Namespace, err)
 	}
 	for _, i := range list.Items {
 		it := i
@@ -113,7 +114,7 @@ func (o *resetCmdOptions) deleteAllIntegrations(c client.Client) (int, error) {
 			continue
 		}
 		if err := c.Delete(o.Context, &it); err != nil {
-			return 0, errors.Wrap(err, fmt.Sprintf("could not delete integration %s from namespace %s", it.Name, it.Namespace))
+			return 0, fmt.Errorf("could not delete integration %s from namespace %s: %w", it.Name, it.Namespace, err)
 		}
 	}
 	return len(list.Items), nil
@@ -122,12 +123,12 @@ func (o *resetCmdOptions) deleteAllIntegrations(c client.Client) (int, error) {
 func (o *resetCmdOptions) deleteAllIntegrationKits(c client.Client) (int, error) {
 	list := v1.NewIntegrationKitList()
 	if err := c.List(o.Context, &list, k8sclient.InNamespace(o.Namespace)); err != nil {
-		return 0, errors.Wrap(err, fmt.Sprintf("could not retrieve integration Kits from namespace %s", o.Namespace))
+		return 0, fmt.Errorf("could not retrieve integration Kits from namespace %s: %w", o.Namespace, err)
 	}
 	for _, i := range list.Items {
 		kit := i
 		if err := c.Delete(o.Context, &kit); err != nil {
-			return 0, errors.Wrap(err, fmt.Sprintf("could not delete integration kit %s from namespace %s", kit.Name, kit.Namespace))
+			return 0, fmt.Errorf("could not delete integration kit %s from namespace %s: %w", kit.Name, kit.Namespace, err)
 		}
 	}
 	return len(list.Items), nil
@@ -136,12 +137,12 @@ func (o *resetCmdOptions) deleteAllIntegrationKits(c client.Client) (int, error)
 func (o *resetCmdOptions) deleteAllPipes(c client.Client) (int, error) {
 	list := v1.NewPipeList()
 	if err := c.List(o.Context, &list, k8sclient.InNamespace(o.Namespace)); err != nil {
-		return 0, errors.Wrap(err, fmt.Sprintf("could not retrieve Pipes from namespace %s", o.Namespace))
+		return 0, fmt.Errorf("could not retrieve Pipes from namespace %s: %w", o.Namespace, err)
 	}
 	for _, i := range list.Items {
 		klb := i
 		if err := c.Delete(o.Context, &klb); err != nil {
-			return 0, errors.Wrap(err, fmt.Sprintf("could not delete Pipe %s from namespace %s", klb.Name, klb.Namespace))
+			return 0, fmt.Errorf("could not delete Pipe %s from namespace %s: %w", klb.Name, klb.Namespace, err)
 		}
 	}
 	return len(list.Items), nil
@@ -151,12 +152,12 @@ func (o *resetCmdOptions) deleteAllPipes(c client.Client) (int, error) {
 func (o *resetCmdOptions) deleteAllKameletBindings(c client.Client) (int, error) {
 	list := v1alpha1.NewKameletBindingList()
 	if err := c.List(o.Context, &list, k8sclient.InNamespace(o.Namespace)); err != nil {
-		return 0, errors.Wrap(err, fmt.Sprintf("could not retrieve KameletBindings from namespace %s", o.Namespace))
+		return 0, fmt.Errorf("could not retrieve KameletBindings from namespace %s: %w", o.Namespace, err)
 	}
 	for _, i := range list.Items {
 		klb := i
 		if err := c.Delete(o.Context, &klb); err != nil {
-			return 0, errors.Wrap(err, fmt.Sprintf("could not delete KameletBinding %s from namespace %s", klb.Name, klb.Namespace))
+			return 0, fmt.Errorf("could not delete KameletBinding %s from namespace %s: %w", klb.Name, klb.Namespace, err)
 		}
 	}
 	return len(list.Items), nil
@@ -165,7 +166,7 @@ func (o *resetCmdOptions) deleteAllKameletBindings(c client.Client) (int, error)
 func (o *resetCmdOptions) resetIntegrationPlatform(c client.Client) error {
 	list := v1.NewIntegrationPlatformList()
 	if err := c.List(o.Context, &list, k8sclient.InNamespace(o.Namespace)); err != nil {
-		return errors.Wrap(err, fmt.Sprintf("could not retrieve integration platform from namespace %s", o.Namespace))
+		return fmt.Errorf("could not retrieve integration platform from namespace %s: %w", o.Namespace, err)
 	}
 	if len(list.Items) > 1 {
 		return fmt.Errorf("expected 1 integration platform in the namespace, found: %d", len(list.Items))
diff --git a/pkg/cmd/root.go b/pkg/cmd/root.go
index 7bf9aa3d1..47ff24d08 100644
--- a/pkg/cmd/root.go
+++ b/pkg/cmd/root.go
@@ -19,11 +19,11 @@ package cmd
 
 import (
 	"context"
+	"errors"
 	"fmt"
 	"os"
 	"strings"
 
-	"github.com/pkg/errors"
 	"github.com/spf13/cobra"
 	"github.com/spf13/viper"
 	"golang.org/x/term"
@@ -180,14 +180,14 @@ func (command *RootCmdOptions) preRun(cmd *cobra.Command, _ []string) error {
 	if !isOfflineCommand(cmd) {
 		c, err := command.GetCmdClient()
 		if err != nil {
-			return errors.Wrap(err, "cannot get command client")
+			return fmt.Errorf("cannot get command client: %w", err)
 		}
 		if command.Namespace == "" {
 			current := viper.GetString("kamel.config.default-namespace")
 			if current == "" {
 				defaultNS, err := c.GetCurrentNamespace(command.KubeConfig)
 				if err != nil {
-					return errors.Wrap(err, "cannot get current namespace")
+					return fmt.Errorf("cannot get current namespace: %w", err)
 				}
 				current = defaultNS
 			}
diff --git a/pkg/cmd/run.go b/pkg/cmd/run.go
index 2911e87c2..228d1dde3 100644
--- a/pkg/cmd/run.go
+++ b/pkg/cmd/run.go
@@ -20,6 +20,7 @@ package cmd
 import (
 	"archive/zip"
 	"context"
+	"errors"
 
 	// this is needed to generate an SHA1 sum for Jars
 	// #nosec G501
@@ -44,7 +45,7 @@ import (
 
 	spectrum "github.com/container-tools/spectrum/pkg/builder"
 	"github.com/magiconair/properties"
-	"github.com/pkg/errors"
+
 	"github.com/spf13/cobra"
 	"github.com/spf13/pflag"
 
@@ -242,7 +243,7 @@ func (o *runCmdOptions) validateArgs(cmd *cobra.Command, args []string) error {
 	}
 
 	if _, err := source.Resolve(context.Background(), args, false, cmd); err != nil {
-		return errors.Wrap(err, "One of the provided sources is not reachable")
+		return fmt.Errorf("one of the provided sources is not reachable: %w", err)
 	}
 
 	return nil
@@ -812,7 +813,7 @@ func (o *runCmdOptions) applyDependencies(cmd *cobra.Command, c client.Client, i
 				}
 			}
 			if err := o.uploadDependency(platform, item, name, cmd, it); err != nil {
-				return errors.Wrap(err, fmt.Sprintf("Error trying to upload %s to the Image Registry.", item))
+				return fmt.Errorf("error trying to upload %s to the Image Registry.: %w", item, err)
 			}
 		} else {
 			if catalog == nil {
@@ -1001,7 +1002,7 @@ func (o *runCmdOptions) uploadDependency(platform *v1.IntegrationPlatform, item
 			query := item[idx+1:]
 			options, err := url.ParseQuery(query)
 			if err != nil {
-				return errors.Wrap(err, fmt.Sprintf("invalid http dependency options %s", query))
+				return fmt.Errorf("invalid http dependency options %s: %w", query, err)
 			}
 			o.RegistryOptions = options
 			depURL = item[:idx]
@@ -1009,9 +1010,9 @@ func (o *runCmdOptions) uploadDependency(platform *v1.IntegrationPlatform, item
 
 		uri, err := url.Parse(depURL)
 		if err != nil {
-			return errors.Wrap(err, fmt.Sprintf("invalid http dependency url %s", depURL))
+			return fmt.Errorf("invalid http dependency url %s: %w", depURL, err)
 		} else if localPath, err = downloadDependency(o.Context, *uri); err != nil {
-			return errors.Wrap(err, fmt.Sprintf("could not download http dependency %s", depURL))
+			return fmt.Errorf("could not download http dependency %s: %w", depURL, err)
 		}
 		// Remove the temporary file
 		defer os.Remove(localPath)
diff --git a/pkg/cmd/source/source.go b/pkg/cmd/source/source.go
index 78737a9f7..0ec53c491 100644
--- a/pkg/cmd/source/source.go
+++ b/pkg/cmd/source/source.go
@@ -32,7 +32,6 @@ import (
 	"golang.org/x/oauth2"
 
 	"github.com/google/go-github/v32/github"
-	"github.com/pkg/errors"
 )
 
 // Source represents the source file of an Integration.
@@ -202,9 +201,9 @@ func resolveGist(ctx context.Context, location string, compress bool, cmd *cobra
 // resolveLocal resolves a source from the local file system.
 func resolveLocal(location string, compress bool) (Source, error) {
 	if _, err := os.Stat(location); err != nil && os.IsNotExist(err) {
-		return Source{}, errors.Wrapf(err, "file %s does not exist", location)
+		return Source{}, fmt.Errorf("file %s does not exist: %w", location, err)
 	} else if err != nil {
-		return Source{}, errors.Wrapf(err, "error while accessing file %s", location)
+		return Source{}, fmt.Errorf("error while accessing file %s: %w", location, err)
 	}
 
 	answer, err := newSource(location, compress, func() ([]byte, error) {
diff --git a/pkg/cmd/source/util.go b/pkg/cmd/source/util.go
index 3ad2dc9ed..85e96a984 100644
--- a/pkg/cmd/source/util.go
+++ b/pkg/cmd/source/util.go
@@ -23,8 +23,6 @@ import (
 	"os"
 	"runtime"
 	"strings"
-
-	"github.com/pkg/errors"
 )
 
 const (
@@ -52,7 +50,7 @@ func IsLocalAndFileExists(uri string) (bool, error) {
 		}
 
 		// If it is a different error (ie, permission denied) we should report it back
-		return false, errors.Wrap(err, fmt.Sprintf("file system error while looking for %s", uri))
+		return false, fmt.Errorf("file system error while looking for %s: %w", uri, err)
 	}
 
 	return !info.IsDir(), nil
diff --git a/pkg/cmd/uninstall.go b/pkg/cmd/uninstall.go
index c96d041e8..12fcfba7b 100644
--- a/pkg/cmd/uninstall.go
+++ b/pkg/cmd/uninstall.go
@@ -19,10 +19,10 @@ package cmd
 
 import (
 	"context"
+	"errors"
 	"fmt"
 	"time"
 
-	"github.com/pkg/errors"
 	"github.com/spf13/cobra"
 	"github.com/spf13/viper"
 
@@ -137,7 +137,7 @@ func (o *uninstallCmdOptions) uninstall(cmd *cobra.Command, _ []string) error {
 	if o.OlmEnabled {
 		var err error
 		if uninstallViaOLM, err = olm.IsAPIAvailable(o.Context, c, o.Namespace); err != nil {
-			return errors.Wrap(err, "error while checking OLM availability. Run with '--olm=false' to skip this check")
+			return fmt.Errorf("error while checking OLM availability. Run with '--olm=false' to skip this check: %w", err)
 		}
 
 		if uninstallViaOLM {
@@ -169,7 +169,7 @@ func (o *uninstallCmdOptions) uninstall(cmd *cobra.Command, _ []string) error {
 				defer cancel()
 				err := watch.WaitPodToTerminate(tctx, c, pod)
 				if err != nil {
-					return errors.Wrap(err, "error while waiting the operator pod to terminate gracefully")
+					return fmt.Errorf("error while waiting the operator pod to terminate gracefully: %w", err)
 				}
 			}
 		}
diff --git a/pkg/controller/build/build_controller.go b/pkg/controller/build/build_controller.go
index ba294e6e2..1c08e8a95 100644
--- a/pkg/controller/build/build_controller.go
+++ b/pkg/controller/build/build_controller.go
@@ -21,7 +21,7 @@ import (
 	"context"
 	"time"
 
-	"k8s.io/apimachinery/pkg/api/errors"
+	k8serrors "k8s.io/apimachinery/pkg/api/errors"
 	"k8s.io/apimachinery/pkg/runtime"
 	"k8s.io/apimachinery/pkg/runtime/schema"
 	"k8s.io/client-go/tools/record"
@@ -121,7 +121,7 @@ func (r *reconcileBuild) Reconcile(ctx context.Context, request reconcile.Reques
 	var instance v1.Build
 
 	if err := r.client.Get(ctx, request.NamespacedName, &instance); err != nil {
-		if errors.IsNotFound(err) {
+		if k8serrors.IsNotFound(err) {
 			// Request object not found, could have been deleted after reconcile request.
 			// Owned objects are automatically garbage collected. For additional cleanup logic use finalizers.
 			// Return and don't requeue
diff --git a/pkg/controller/build/build_pod.go b/pkg/controller/build/build_pod.go
index 7095f9881..fe51dcde8 100644
--- a/pkg/controller/build/build_pod.go
+++ b/pkg/controller/build/build_pod.go
@@ -19,14 +19,13 @@ package build
 
 import (
 	"context"
+	"errors"
 	"fmt"
 	"os"
 	"path/filepath"
 	"strconv"
 	"strings"
 
-	"github.com/pkg/errors"
-
 	corev1 "k8s.io/api/core/v1"
 	k8serrors "k8s.io/apimachinery/pkg/api/errors"
 	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
diff --git a/pkg/controller/build/initialize_pod.go b/pkg/controller/build/initialize_pod.go
index f8b0a8896..a7b5ad405 100644
--- a/pkg/controller/build/initialize_pod.go
+++ b/pkg/controller/build/initialize_pod.go
@@ -19,11 +19,10 @@ package build
 
 import (
 	"context"
+	"fmt"
 
 	ctrl "sigs.k8s.io/controller-runtime/pkg/client"
 
-	"github.com/pkg/errors"
-
 	v1 "github.com/apache/camel-k/v2/pkg/apis/camel/v1"
 )
 
@@ -51,7 +50,7 @@ func (action *initializePodAction) CanHandle(build *v1.Build) bool {
 // Handle handles the builds.
 func (action *initializePodAction) Handle(ctx context.Context, build *v1.Build) (*v1.Build, error) {
 	if err := deleteBuilderPod(ctx, action.client, build); err != nil {
-		return nil, errors.Wrap(err, "cannot delete build pod")
+		return nil, fmt.Errorf("cannot delete build pod: %w", err)
 	}
 
 	pod, err := getBuilderPod(ctx, action.reader, build)
diff --git a/pkg/controller/build/monitor_pod.go b/pkg/controller/build/monitor_pod.go
index c9b7be754..687bfb3ca 100644
--- a/pkg/controller/build/monitor_pod.go
+++ b/pkg/controller/build/monitor_pod.go
@@ -20,6 +20,7 @@ package build
 import (
 	"context"
 	"encoding/json"
+	"fmt"
 	"os"
 	"time"
 
@@ -32,8 +33,6 @@ import (
 	ctrl "sigs.k8s.io/controller-runtime/pkg/client"
 	"sigs.k8s.io/controller-runtime/pkg/controller/controllerutil"
 
-	"github.com/pkg/errors"
-
 	v1 "github.com/apache/camel-k/v2/pkg/apis/camel/v1"
 	"github.com/apache/camel-k/v2/pkg/platform"
 	"github.com/apache/camel-k/v2/pkg/util/kubernetes"
@@ -92,7 +91,7 @@ func (action *monitorPodAction) Handle(ctx context.Context, build *v1.Build) (*v
 			}
 
 			if err = action.client.Create(ctx, pod); err != nil {
-				return nil, errors.Wrap(err, "cannot create build pod")
+				return nil, fmt.Errorf("cannot create build pod: %w", err)
 			}
 
 		case v1.BuildPhaseRunning:
diff --git a/pkg/controller/catalog/catalog_controller.go b/pkg/controller/catalog/catalog_controller.go
index 8dc5e74d5..8ff7073c5 100644
--- a/pkg/controller/catalog/catalog_controller.go
+++ b/pkg/controller/catalog/catalog_controller.go
@@ -22,7 +22,7 @@ import (
 	goruntime "runtime"
 	"time"
 
-	"k8s.io/apimachinery/pkg/api/errors"
+	k8serrors "k8s.io/apimachinery/pkg/api/errors"
 	"k8s.io/apimachinery/pkg/runtime"
 	"k8s.io/apimachinery/pkg/runtime/schema"
 	"k8s.io/client-go/tools/record"
@@ -126,7 +126,7 @@ func (r *reconcileCatalog) Reconcile(ctx context.Context, request reconcile.Requ
 	var instance v1.CamelCatalog
 
 	if err := r.client.Get(ctx, request.NamespacedName, &instance); err != nil {
-		if errors.IsNotFound(err) {
+		if k8serrors.IsNotFound(err) {
 			// Request object not found, could have been deleted after reconcile request.
 			// Owned objects are automatically garbage collected. For additional cleanup
 			// logic use finalizers.
diff --git a/pkg/controller/integration/build_kit.go b/pkg/controller/integration/build_kit.go
index 8a291f7bc..ee84fb36c 100644
--- a/pkg/controller/integration/build_kit.go
+++ b/pkg/controller/integration/build_kit.go
@@ -19,8 +19,7 @@ package integration
 
 import (
 	"context"
-
-	"github.com/pkg/errors"
+	"fmt"
 
 	v1 "github.com/apache/camel-k/v2/pkg/apis/camel/v1"
 	"github.com/apache/camel-k/v2/pkg/trait"
@@ -69,15 +68,17 @@ func (action *buildKitAction) Handle(ctx context.Context, integration *v1.Integr
 		kit, err := kubernetes.GetIntegrationKit(ctx, action.client,
 			integration.Status.IntegrationKit.Name, integration.Status.IntegrationKit.Namespace)
 		if err != nil {
-			return nil, errors.Wrapf(err, "unable to find integration kit %s/%s, %s",
-				integration.Status.IntegrationKit.Namespace, integration.Status.IntegrationKit.Name, err)
+			return nil, fmt.Errorf("unable to find integration kit %s/%s, %s: %w",
+				integration.Status.IntegrationKit.Namespace, integration.Status.IntegrationKit.Name, err, err)
+
 		}
 
 		if kit.Labels[v1.IntegrationKitTypeLabel] == v1.IntegrationKitTypePlatform {
 			match, err := integrationMatches(integration, kit)
 			if err != nil {
-				return nil, errors.Wrapf(err, "unable to match any integration kit with integration %s/%s",
-					integration.Namespace, integration.Name)
+				return nil, fmt.Errorf("unable to match any integration kit with integration %s/%s: %w",
+					integration.Namespace, integration.Name, err)
+
 			} else if !match {
 				// We need to re-generate a kit, or search for a new one that
 				// matches the integration, so let's remove the association
@@ -113,8 +114,9 @@ func (action *buildKitAction) Handle(ctx context.Context, integration *v1.Integr
 	action.L.Debug("No kit specified in integration status so looking up", "integration", integration.Name, "namespace", integration.Namespace)
 	existingKits, err := lookupKitsForIntegration(ctx, action.client, integration)
 	if err != nil {
-		return nil, errors.Wrapf(err, "failed to lookup kits for integration %s/%s",
-			integration.Namespace, integration.Name)
+		return nil, fmt.Errorf("failed to lookup kits for integration %s/%s: %w",
+			integration.Namespace, integration.Name, err)
+
 	}
 
 	action.L.Debug("Applying traits to integration",
@@ -122,8 +124,9 @@ func (action *buildKitAction) Handle(ctx context.Context, integration *v1.Integr
 		"namespace", integration.Namespace)
 	env, err := trait.Apply(ctx, action.client, integration, nil)
 	if err != nil {
-		return nil, errors.Wrapf(err, "failed to apply traits to integration %s/%s",
-			integration.Namespace, integration.Name)
+		return nil, fmt.Errorf("failed to apply traits to integration %s/%s: %w",
+			integration.Namespace, integration.Name, err)
+
 	}
 
 	action.L.Debug("Searching integration kits to assign to integration", "integration",
@@ -139,9 +142,9 @@ kits:
 			action.L.Debug("Comparing existing kit with environment", "env kit", kit.Name, "existing kit", k.Name)
 			match, err := kitMatches(&kit, k)
 			if err != nil {
-				return nil, errors.Wrapf(err,
-					"error occurred matches integration kits with environment for integration %s/%s",
-					integration.Namespace, integration.Name)
+				return nil, fmt.Errorf("error occurred matches integration kits with environment for integration %s/%s: %w",
+					integration.Namespace, integration.Name, err)
+
 			}
 			if match {
 				if integrationKit == nil ||
@@ -162,8 +165,9 @@ kits:
 			"namespace", integration.Namespace,
 			"integration kit", kit.Name)
 		if err := action.client.Create(ctx, &kit); err != nil {
-			return nil, errors.Wrapf(err, "failed to create new integration kit for integration %s/%s",
-				integration.Namespace, integration.Name)
+			return nil, fmt.Errorf("failed to create new integration kit for integration %s/%s: %w",
+				integration.Namespace, integration.Name, err)
+
 		}
 		if integrationKit == nil {
 			integrationKit = &kit
diff --git a/pkg/controller/integration/integration_controller.go b/pkg/controller/integration/integration_controller.go
index 6b4f16042..ae862fd2b 100644
--- a/pkg/controller/integration/integration_controller.go
+++ b/pkg/controller/integration/integration_controller.go
@@ -23,8 +23,6 @@ import (
 	"reflect"
 	"time"
 
-	"github.com/pkg/errors"
-
 	appsv1 "k8s.io/api/apps/v1"
 	batchv1 "k8s.io/api/batch/v1"
 	corev1 "k8s.io/api/core/v1"
@@ -64,7 +62,7 @@ func Add(ctx context.Context, mgr manager.Manager, c client.Client) error {
 		})
 
 	if err != nil {
-		return errors.Wrapf(err, "unable to set up field indexer for status.phase")
+		return fmt.Errorf("unable to set up field indexer for status.phase: %w", err)
 	}
 
 	return add(ctx, mgr, c, newReconciler(mgr, c))
diff --git a/pkg/controller/integration/kits.go b/pkg/controller/integration/kits.go
index 8c8cebd1e..8dbc7337f 100644
--- a/pkg/controller/integration/kits.go
+++ b/pkg/controller/integration/kits.go
@@ -22,7 +22,7 @@ import (
 	"fmt"
 	"reflect"
 
-	"k8s.io/apimachinery/pkg/api/errors"
+	k8serrors "k8s.io/apimachinery/pkg/api/errors"
 	"k8s.io/apimachinery/pkg/labels"
 	"k8s.io/apimachinery/pkg/selection"
 
@@ -38,7 +38,7 @@ import (
 
 func lookupKitsForIntegration(ctx context.Context, c ctrl.Reader, integration *v1.Integration, options ...ctrl.ListOption) ([]v1.IntegrationKit, error) {
 	pl, err := platform.GetForResource(ctx, c, integration)
-	if err != nil && !errors.IsNotFound(err) {
+	if err != nil && !k8serrors.IsNotFound(err) {
 		return nil, err
 	}
 
diff --git a/pkg/controller/integrationkit/build.go b/pkg/controller/integrationkit/build.go
index c33deb920..6d553c671 100644
--- a/pkg/controller/integrationkit/build.go
+++ b/pkg/controller/integrationkit/build.go
@@ -19,12 +19,12 @@ package integrationkit
 
 import (
 	"context"
+	"errors"
 	"fmt"
 	"strings"
 	"time"
 
 	"github.com/apache/camel-k/v2/pkg/util/defaults"
-	"github.com/pkg/errors"
 
 	k8serrors "k8s.io/apimachinery/pkg/api/errors"
 	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
@@ -120,7 +120,7 @@ func (action *buildAction) handleBuildSubmitted(ctx context.Context, kit *v1.Int
 			if pvc, err := kubernetes.LookupPersistentVolumeClaim(env.Ctx, env.Client, builderPodNamespace, defaults.DefaultPVC); pvc != nil || err != nil {
 				err = platform.CreateBuilderServiceAccount(env.Ctx, env.Client, env.Platform)
 				if err != nil {
-					return nil, errors.Wrap(err, "Error while creating Camel K Builder service account")
+					return nil, fmt.Errorf("error while creating Camel K Builder service account: %w", err)
 				}
 			} else {
 				// Fallback to Routine strategy
@@ -157,12 +157,12 @@ func (action *buildAction) handleBuildSubmitted(ctx context.Context, kit *v1.Int
 
 		err = action.client.Delete(ctx, build)
 		if err != nil && !k8serrors.IsNotFound(err) {
-			return nil, errors.Wrap(err, "cannot delete build")
+			return nil, fmt.Errorf("cannot delete build: %w", err)
 		}
 
 		err = action.client.Create(ctx, build)
 		if err != nil {
-			return nil, errors.Wrap(err, "cannot create build")
+			return nil, fmt.Errorf("cannot create build: %w", err)
 		}
 	}
 
diff --git a/pkg/controller/integrationkit/initialize.go b/pkg/controller/integrationkit/initialize.go
index 8f4f3e49a..2e6b95b13 100644
--- a/pkg/controller/integrationkit/initialize.go
+++ b/pkg/controller/integrationkit/initialize.go
@@ -26,7 +26,7 @@ import (
 	"github.com/apache/camel-k/v2/pkg/trait"
 	"github.com/apache/camel-k/v2/pkg/util/defaults"
 	"github.com/apache/camel-k/v2/pkg/util/kubernetes"
-	"k8s.io/apimachinery/pkg/api/errors"
+	k8serrors "k8s.io/apimachinery/pkg/api/errors"
 )
 
 // NewInitializeAction creates a new initialization handling action for the kit.
@@ -65,7 +65,7 @@ func (action *initializeAction) Handle(ctx context.Context, kit *v1.IntegrationK
 		)
 
 		if err != nil {
-			if errors.IsNotFound(err) {
+			if k8serrors.IsNotFound(err) {
 				// If the catalog is not available, likely it was required to be created
 				// by Integration trait, so we'll need to wait for it the be available
 				kit.Status.Phase = v1.IntegrationKitPhaseWaitingForCatalog
diff --git a/pkg/controller/integrationkit/integrationkit_controller.go b/pkg/controller/integrationkit/integrationkit_controller.go
index 71d917301..348645605 100644
--- a/pkg/controller/integrationkit/integrationkit_controller.go
+++ b/pkg/controller/integrationkit/integrationkit_controller.go
@@ -22,7 +22,7 @@ import (
 	"fmt"
 	"time"
 
-	"k8s.io/apimachinery/pkg/api/errors"
+	k8serrors "k8s.io/apimachinery/pkg/api/errors"
 	"k8s.io/apimachinery/pkg/runtime"
 	"k8s.io/apimachinery/pkg/runtime/schema"
 	"k8s.io/apimachinery/pkg/types"
@@ -208,7 +208,7 @@ func (r *reconcileIntegrationKit) Reconcile(ctx context.Context, request reconci
 
 	// Fetch the IntegrationKit instance
 	if err := r.client.Get(ctx, request.NamespacedName, &instance); err != nil {
-		if errors.IsNotFound(err) {
+		if k8serrors.IsNotFound(err) {
 			// Request object not found, could have been deleted after reconcile request.
 			// Owned objects are automatically garbage collected. For additional cleanup logic use finalizers.
 			// Return and don't requeue
diff --git a/pkg/controller/integrationplatform/integrationplatform_controller.go b/pkg/controller/integrationplatform/integrationplatform_controller.go
index 7d00cc431..9990abd1d 100644
--- a/pkg/controller/integrationplatform/integrationplatform_controller.go
+++ b/pkg/controller/integrationplatform/integrationplatform_controller.go
@@ -21,7 +21,7 @@ import (
 	"context"
 	"time"
 
-	"k8s.io/apimachinery/pkg/api/errors"
+	k8serrors "k8s.io/apimachinery/pkg/api/errors"
 	"k8s.io/apimachinery/pkg/runtime"
 	"k8s.io/apimachinery/pkg/runtime/schema"
 	"k8s.io/client-go/tools/record"
@@ -135,7 +135,7 @@ func (r *reconcileIntegrationPlatform) Reconcile(ctx context.Context, request re
 	var instance v1.IntegrationPlatform
 
 	if err := r.client.Get(ctx, request.NamespacedName, &instance); err != nil {
-		if errors.IsNotFound(err) {
+		if k8serrors.IsNotFound(err) {
 			// Request object not found, could have been deleted after reconcile request.
 			// Owned objects are automatically garbage collected. For additional cleanup
 			// logic use finalizers.
diff --git a/pkg/controller/integrationplatform/kaniko_cache.go b/pkg/controller/integrationplatform/kaniko_cache.go
index 4b08d3b79..f82ef1d52 100644
--- a/pkg/controller/integrationplatform/kaniko_cache.go
+++ b/pkg/controller/integrationplatform/kaniko_cache.go
@@ -21,8 +21,6 @@ import (
 	"context"
 	"fmt"
 
-	"github.com/pkg/errors"
-
 	corev1 "k8s.io/api/core/v1"
 	apierrors "k8s.io/apimachinery/pkg/api/errors"
 	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
@@ -110,12 +108,12 @@ func createKanikoCacheWarmerPod(ctx context.Context, client client.Client, platf
 
 	err := client.Delete(ctx, &pod)
 	if err != nil && !apierrors.IsNotFound(err) {
-		return errors.Wrap(err, "cannot delete Kaniko warmer pod")
+		return fmt.Errorf("cannot delete Kaniko warmer pod: %w", err)
 	}
 
 	err = client.Create(ctx, &pod)
 	if err != nil {
-		return errors.Wrap(err, "cannot create Kaniko warmer pod")
+		return fmt.Errorf("cannot create Kaniko warmer pod: %w", err)
 	}
 
 	return nil
diff --git a/pkg/controller/kamelet/kamelet_controller.go b/pkg/controller/kamelet/kamelet_controller.go
index d4f0fa560..bd6e12d87 100644
--- a/pkg/controller/kamelet/kamelet_controller.go
+++ b/pkg/controller/kamelet/kamelet_controller.go
@@ -22,7 +22,7 @@ import (
 	goruntime "runtime"
 	"time"
 
-	"k8s.io/apimachinery/pkg/api/errors"
+	k8serrors "k8s.io/apimachinery/pkg/api/errors"
 	"k8s.io/apimachinery/pkg/runtime"
 	"k8s.io/apimachinery/pkg/runtime/schema"
 	"k8s.io/client-go/tools/record"
@@ -127,7 +127,7 @@ func (r *reconcileKamelet) Reconcile(ctx context.Context, request reconcile.Requ
 	var instance v1.Kamelet
 
 	if err := r.client.Get(ctx, request.NamespacedName, &instance); err != nil {
-		if errors.IsNotFound(err) {
+		if k8serrors.IsNotFound(err) {
 			// Request object not found, could have been deleted after reconcile request.
 			// Owned objects are automatically garbage collected. For additional cleanup
 			// logic use finalizers.
diff --git a/pkg/controller/kameletbinding/error_handler.go b/pkg/controller/kameletbinding/error_handler.go
index 2c1ee036a..603b8af7a 100644
--- a/pkg/controller/kameletbinding/error_handler.go
+++ b/pkg/controller/kameletbinding/error_handler.go
@@ -19,11 +19,11 @@ package kameletbinding
 
 import (
 	"encoding/json"
+	"errors"
 	"fmt"
 
 	"github.com/apache/camel-k/v2/pkg/apis/camel/v1alpha1"
 	"github.com/apache/camel-k/v2/pkg/util/bindings"
-	"github.com/pkg/errors"
 )
 
 func maybeErrorHandler(errHandlConf *v1alpha1.ErrorHandlerSpec, bindingContext bindings.V1alpha1BindingContext) (*bindings.Binding, error) {
@@ -31,13 +31,13 @@ func maybeErrorHandler(errHandlConf *v1alpha1.ErrorHandlerSpec, bindingContext b
 	if errHandlConf != nil {
 		errorHandlerSpec, err := parseErrorHandler(errHandlConf.RawMessage)
 		if err != nil {
-			return nil, errors.Wrap(err, "could not parse error handler")
+			return nil, fmt.Errorf("could not parse error handler: %w", err)
 		}
 		// We need to get the translated URI from any referenced resource (ie, kamelets)
 		if errorHandlerSpec.Type() == v1alpha1.ErrorHandlerTypeSink {
 			errorHandlerBinding, err = bindings.TranslateV1alpha1(bindingContext, bindings.V1alpha1EndpointContext{Type: v1alpha1.EndpointTypeErrorHandler}, *errorHandlerSpec.Endpoint())
 			if err != nil {
-				return nil, errors.Wrap(err, "could not determine error handler URI")
+				return nil, fmt.Errorf("could not determine error handler URI: %w", err)
 			}
 		} else {
 			// Create a new binding otherwise in order to store error handler application properties
@@ -48,7 +48,7 @@ func maybeErrorHandler(errHandlConf *v1alpha1.ErrorHandlerSpec, bindingContext b
 
 		err = setErrorHandlerConfiguration(errorHandlerBinding, errorHandlerSpec)
 		if err != nil {
-			return nil, errors.Wrap(err, "could not set integration error handler")
+			return nil, fmt.Errorf("could not set integration error handler: %w", err)
 		}
 
 		return errorHandlerBinding, nil
@@ -63,7 +63,7 @@ func parseErrorHandler(rawMessage v1alpha1.RawMessage) (v1alpha1.ErrorHandler, e
 		return nil, err
 	}
 	if len(properties) > 1 {
-		return nil, errors.Errorf("You must provide just 1 error handler, provided %d", len(properties))
+		return nil, fmt.Errorf("you must provide just 1 error handler, provided %d", len(properties))
 	}
 
 	for errHandlType, errHandlValue := range properties {
@@ -76,7 +76,7 @@ func parseErrorHandler(rawMessage v1alpha1.RawMessage) (v1alpha1.ErrorHandler, e
 		case v1alpha1.ErrorHandlerTypeSink:
 			dst = new(v1alpha1.ErrorHandlerSink)
 		default:
-			return nil, errors.Errorf("Unknown error handler type %s", errHandlType)
+			return nil, fmt.Errorf("unknown error handler type %s", errHandlType)
 		}
 
 		if err = json.Unmarshal(errHandlValue, dst); err != nil {
@@ -89,7 +89,7 @@ func parseErrorHandler(rawMessage v1alpha1.RawMessage) (v1alpha1.ErrorHandler, e
 		return dst, nil
 	}
 
-	return nil, errors.New("You must provide any supported error handler")
+	return nil, errors.New("you must provide any supported error handler")
 }
 
 func setErrorHandlerConfiguration(errorHandlerBinding *bindings.Binding, errorHandler v1alpha1.ErrorHandler) error {
diff --git a/pkg/controller/kameletbinding/initialize.go b/pkg/controller/kameletbinding/initialize.go
index 35afba27f..0e4afa700 100644
--- a/pkg/controller/kameletbinding/initialize.go
+++ b/pkg/controller/kameletbinding/initialize.go
@@ -19,6 +19,7 @@ package kameletbinding
 
 import (
 	"context"
+	"fmt"
 	"strings"
 
 	v1alpha1 "github.com/apache/camel-k/v2/pkg/apis/camel/v1alpha1"
@@ -27,7 +28,7 @@ import (
 	"github.com/apache/camel-k/v2/pkg/platform"
 	"github.com/apache/camel-k/v2/pkg/util/kubernetes"
 	"github.com/apache/camel-k/v2/pkg/util/patch"
-	"github.com/pkg/errors"
+
 	corev1 "k8s.io/api/core/v1"
 	"k8s.io/apimachinery/pkg/types"
 	"sigs.k8s.io/controller-runtime/pkg/client"
@@ -60,7 +61,7 @@ func (action *initializeAction) Handle(ctx context.Context, binding *v1alpha1.Ka
 	}
 
 	if _, err := kubernetes.ReplaceResource(ctx, action.client, it); err != nil {
-		return nil, errors.Wrap(err, "could not create integration for KameletBinding")
+		return nil, fmt.Errorf("could not create integration for KameletBinding: %w", err)
 	}
 
 	// propagate Kamelet icon (best effort)
diff --git a/pkg/controller/kameletbinding/integration.go b/pkg/controller/kameletbinding/integration.go
index 1d4fdc796..04720c25f 100644
--- a/pkg/controller/kameletbinding/integration.go
+++ b/pkg/controller/kameletbinding/integration.go
@@ -20,10 +20,9 @@ package kameletbinding
 import (
 	"context"
 	"encoding/json"
+	"fmt"
 	"sort"
 
-	"github.com/pkg/errors"
-
 	k8serrors "k8s.io/apimachinery/pkg/api/errors"
 	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
 
@@ -106,16 +105,16 @@ func CreateIntegrationFor(ctx context.Context, c client.Client, binding *v1alpha
 
 	from, err := bindings.TranslateV1alpha1(bindingContext, endpointTypeSourceContext, binding.Spec.Source)
 	if err != nil {
-		return nil, errors.Wrap(err, "could not determine source URI")
+		return nil, fmt.Errorf("could not determine source URI: %w", err)
 	}
 	to, err := bindings.TranslateV1alpha1(bindingContext, endpointTypeSinkContext, binding.Spec.Sink)
 	if err != nil {
-		return nil, errors.Wrap(err, "could not determine sink URI")
+		return nil, fmt.Errorf("could not determine sink URI: %w", err)
 	}
 	// error handler is optional
 	errorHandler, err := maybeErrorHandler(binding.Spec.ErrorHandler, bindingContext)
 	if err != nil {
-		return nil, errors.Wrap(err, "could not determine error handler")
+		return nil, fmt.Errorf("could not determine error handler: %w", err)
 	}
 
 	steps := make([]*bindings.Binding, 0, len(binding.Spec.Steps))
@@ -126,20 +125,20 @@ func CreateIntegrationFor(ctx context.Context, c client.Client, binding *v1alpha
 			Position: &position,
 		}, step)
 		if err != nil {
-			return nil, errors.Wrapf(err, "could not determine URI for step %d", idx)
+			return nil, fmt.Errorf("could not determine URI for step %d: %w", idx, err)
 		}
 		steps = append(steps, stepKameletBinding)
 	}
 
 	if to.Step == nil && to.URI == "" {
-		return nil, errors.Errorf("illegal step definition for sink step: either Step or URI should be provided")
+		return nil, fmt.Errorf("illegal step definition for sink step: either Step or URI should be provided")
 	}
 	if from.URI == "" {
-		return nil, errors.Errorf("illegal step definition for source step: URI should be provided")
+		return nil, fmt.Errorf("illegal step definition for source step: URI should be provided")
 	}
 	for index, step := range steps {
 		if step.Step == nil && step.URI == "" {
-			return nil, errors.Errorf("illegal step definition for step %d: either Step or URI should be provided", index)
+			return nil, fmt.Errorf("illegal step definition for step %d: either Step or URI should be provided", index)
 		}
 	}
 
@@ -239,7 +238,7 @@ func determineProfile(ctx context.Context, c client.Client, binding *v1alpha1.Ka
 	}
 	pl, err := platform.GetForResource(ctx, c, binding)
 	if err != nil && !k8serrors.IsNotFound(err) {
-		return "", errors.Wrap(err, "error while retrieving the integration platform")
+		return "", fmt.Errorf("error while retrieving the integration platform: %w", err)
 	}
 	if pl != nil {
 		if pl.Status.Profile != "" {
diff --git a/pkg/controller/kameletbinding/kameletbinding_controller.go b/pkg/controller/kameletbinding/kameletbinding_controller.go
index 0553b4d92..0461f6166 100644
--- a/pkg/controller/kameletbinding/kameletbinding_controller.go
+++ b/pkg/controller/kameletbinding/kameletbinding_controller.go
@@ -20,7 +20,7 @@ package kameletbinding
 import (
 	"context"
 
-	"k8s.io/apimachinery/pkg/api/errors"
+	k8serrors "k8s.io/apimachinery/pkg/api/errors"
 	"k8s.io/apimachinery/pkg/runtime"
 	"k8s.io/apimachinery/pkg/runtime/schema"
 	"k8s.io/client-go/tools/record"
@@ -157,7 +157,7 @@ func (r *ReconcileKameletBinding) Reconcile(ctx context.Context, request reconci
 	var instance v1alpha1.KameletBinding
 
 	if err := r.client.Get(ctx, request.NamespacedName, &instance); err != nil {
-		if errors.IsNotFound(err) {
+		if k8serrors.IsNotFound(err) {
 			// Request object not found, could have been deleted after reconcile request.
 			// Owned objects are automatically garbage collected. For additional cleanup
 			// logic use finalizers.
diff --git a/pkg/controller/kameletbinding/monitor.go b/pkg/controller/kameletbinding/monitor.go
index 8c8656316..2c23d062a 100644
--- a/pkg/controller/kameletbinding/monitor.go
+++ b/pkg/controller/kameletbinding/monitor.go
@@ -21,8 +21,6 @@ import (
 	"context"
 	"fmt"
 
-	"github.com/pkg/errors"
-
 	corev1 "k8s.io/api/core/v1"
 	"k8s.io/apimachinery/pkg/api/equality"
 	k8serrors "k8s.io/apimachinery/pkg/api/errors"
@@ -72,7 +70,7 @@ func (action *monitorAction) Handle(ctx context.Context, binding *v1alpha1.Kamel
 		)
 		return target, nil
 	} else if err != nil {
-		return nil, errors.Wrapf(err, "could not load integration for Binding %q", binding.Name)
+		return nil, fmt.Errorf("could not load integration for Binding %q: %w", binding.Name, err)
 	}
 
 	operatorIDChanged := v1.GetOperatorIDAnnotation(binding) != "" &&
diff --git a/pkg/controller/pipe/error_handler.go b/pkg/controller/pipe/error_handler.go
index 865b8d1fd..fd00c85bc 100644
--- a/pkg/controller/pipe/error_handler.go
+++ b/pkg/controller/pipe/error_handler.go
@@ -19,11 +19,11 @@ package pipe
 
 import (
 	"encoding/json"
+	"errors"
 	"fmt"
 
 	v1 "github.com/apache/camel-k/v2/pkg/apis/camel/v1"
 	"github.com/apache/camel-k/v2/pkg/util/bindings"
-	"github.com/pkg/errors"
 )
 
 func maybeErrorHandler(errHandlConf *v1.ErrorHandlerSpec, bindingContext bindings.BindingContext) (*bindings.Binding, error) {
@@ -31,13 +31,13 @@ func maybeErrorHandler(errHandlConf *v1.ErrorHandlerSpec, bindingContext binding
 	if errHandlConf != nil {
 		errorHandlerSpec, err := parseErrorHandler(errHandlConf.RawMessage)
 		if err != nil {
-			return nil, errors.Wrap(err, "could not parse error handler")
+			return nil, fmt.Errorf("could not parse error handler: %w", err)
 		}
 		// We need to get the translated URI from any referenced resource (ie, kamelets)
 		if errorHandlerSpec.Type() == v1.ErrorHandlerTypeSink {
 			errorHandlerBinding, err = bindings.Translate(bindingContext, bindings.EndpointContext{Type: v1.EndpointTypeErrorHandler}, *errorHandlerSpec.Endpoint())
 			if err != nil {
-				return nil, errors.Wrap(err, "could not determine error handler URI")
+				return nil, fmt.Errorf("could not determine error handler URI: %w", err)
 			}
 		} else {
 			// Create a new binding otherwise in order to store error handler application properties
@@ -48,7 +48,7 @@ func maybeErrorHandler(errHandlConf *v1.ErrorHandlerSpec, bindingContext binding
 
 		err = setErrorHandlerConfiguration(errorHandlerBinding, errorHandlerSpec)
 		if err != nil {
-			return nil, errors.Wrap(err, "could not set integration error handler")
+			return nil, fmt.Errorf("could not set integration error handler: %w", err)
 		}
 
 		return errorHandlerBinding, nil
@@ -63,7 +63,7 @@ func parseErrorHandler(rawMessage v1.RawMessage) (v1.ErrorHandler, error) {
 		return nil, err
 	}
 	if len(properties) > 1 {
-		return nil, errors.Errorf("You must provide just 1 error handler, provided %d", len(properties))
+		return nil, fmt.Errorf("you must provide just 1 error handler, provided %d", len(properties))
 	}
 
 	for errHandlType, errHandlValue := range properties {
@@ -76,7 +76,7 @@ func parseErrorHandler(rawMessage v1.RawMessage) (v1.ErrorHandler, error) {
 		case v1.ErrorHandlerTypeSink:
 			dst = new(v1.ErrorHandlerSink)
 		default:
-			return nil, errors.Errorf("Unknown error handler type %s", errHandlType)
+			return nil, fmt.Errorf("unknown error handler type %s", errHandlType)
 		}
 
 		if err = json.Unmarshal(errHandlValue, dst); err != nil {
@@ -89,7 +89,7 @@ func parseErrorHandler(rawMessage v1.RawMessage) (v1.ErrorHandler, error) {
 		return dst, nil
 	}
 
-	return nil, errors.New("You must provide any supported error handler")
+	return nil, errors.New("you must provide any supported error handler")
 }
 
 func setErrorHandlerConfiguration(errorHandlerBinding *bindings.Binding, errorHandler v1.ErrorHandler) error {
diff --git a/pkg/controller/pipe/initialize.go b/pkg/controller/pipe/initialize.go
index 8fb5a870b..79ad4f2a4 100644
--- a/pkg/controller/pipe/initialize.go
+++ b/pkg/controller/pipe/initialize.go
@@ -19,6 +19,7 @@ package pipe
 
 import (
 	"context"
+	"fmt"
 	"strings"
 
 	v1 "github.com/apache/camel-k/v2/pkg/apis/camel/v1"
@@ -27,7 +28,7 @@ import (
 	"github.com/apache/camel-k/v2/pkg/platform"
 	"github.com/apache/camel-k/v2/pkg/util/kubernetes"
 	"github.com/apache/camel-k/v2/pkg/util/patch"
-	"github.com/pkg/errors"
+
 	corev1 "k8s.io/api/core/v1"
 	"k8s.io/apimachinery/pkg/types"
 	"sigs.k8s.io/controller-runtime/pkg/client"
@@ -60,7 +61,7 @@ func (action *initializeAction) Handle(ctx context.Context, binding *v1.Pipe) (*
 	}
 
 	if _, err := kubernetes.ReplaceResource(ctx, action.client, it); err != nil {
-		return nil, errors.Wrap(err, "could not create integration forPipe")
+		return nil, fmt.Errorf("could not create integration forPipe: %w", err)
 	}
 
 	// propagate Kamelet icon (best effort)
diff --git a/pkg/controller/pipe/integration.go b/pkg/controller/pipe/integration.go
index 770c573e4..9d21e1c41 100644
--- a/pkg/controller/pipe/integration.go
+++ b/pkg/controller/pipe/integration.go
@@ -20,10 +20,9 @@ package pipe
 import (
 	"context"
 	"encoding/json"
+	"fmt"
 	"sort"
 
-	"github.com/pkg/errors"
-
 	k8serrors "k8s.io/apimachinery/pkg/api/errors"
 	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
 
@@ -106,16 +105,16 @@ func CreateIntegrationFor(ctx context.Context, c client.Client, binding *v1.Pipe
 
 	from, err := bindings.Translate(bindingContext, endpointTypeSourceContext, binding.Spec.Source)
 	if err != nil {
-		return nil, errors.Wrap(err, "could not determine source URI")
+		return nil, fmt.Errorf("could not determine source URI: %w", err)
 	}
 	to, err := bindings.Translate(bindingContext, endpointTypeSinkContext, binding.Spec.Sink)
 	if err != nil {
-		return nil, errors.Wrap(err, "could not determine sink URI")
+		return nil, fmt.Errorf("could not determine sink URI: %w", err)
 	}
 	// error handler is optional
 	errorHandler, err := maybeErrorHandler(binding.Spec.ErrorHandler, bindingContext)
 	if err != nil {
-		return nil, errors.Wrap(err, "could not determine error handler")
+		return nil, fmt.Errorf("could not determine error handler: %w", err)
 	}
 
 	steps := make([]*bindings.Binding, 0, len(binding.Spec.Steps))
@@ -126,20 +125,20 @@ func CreateIntegrationFor(ctx context.Context, c client.Client, binding *v1.Pipe
 			Position: &position,
 		}, step)
 		if err != nil {
-			return nil, errors.Wrapf(err, "could not determine URI for step %d", idx)
+			return nil, fmt.Errorf("could not determine URI for step %d: %w", idx, err)
 		}
 		steps = append(steps, stepBinding)
 	}
 
 	if to.Step == nil && to.URI == "" {
-		return nil, errors.Errorf("illegal step definition for sink step: either Step or URI should be provided")
+		return nil, fmt.Errorf("illegal step definition for sink step: either Step or URI should be provided")
 	}
 	if from.URI == "" {
-		return nil, errors.Errorf("illegal step definition for source step: URI should be provided")
+		return nil, fmt.Errorf("illegal step definition for source step: URI should be provided")
 	}
 	for index, step := range steps {
 		if step.Step == nil && step.URI == "" {
-			return nil, errors.Errorf("illegal step definition for step %d: either Step or URI should be provided", index)
+			return nil, fmt.Errorf("illegal step definition for step %d: either Step or URI should be provided", index)
 		}
 	}
 
@@ -239,7 +238,7 @@ func determineProfile(ctx context.Context, c client.Client, binding *v1.Pipe) (v
 	}
 	pl, err := platform.GetForResource(ctx, c, binding)
 	if err != nil && !k8serrors.IsNotFound(err) {
-		return "", errors.Wrap(err, "error while retrieving the integration platform")
+		return "", fmt.Errorf("error while retrieving the integration platform: %w", err)
 	}
 	if pl != nil {
 		if pl.Status.Profile != "" {
diff --git a/pkg/controller/pipe/monitor.go b/pkg/controller/pipe/monitor.go
index 58f0f231e..a2bff2456 100644
--- a/pkg/controller/pipe/monitor.go
+++ b/pkg/controller/pipe/monitor.go
@@ -21,8 +21,6 @@ import (
 	"context"
 	"fmt"
 
-	"github.com/pkg/errors"
-
 	corev1 "k8s.io/api/core/v1"
 	"k8s.io/apimachinery/pkg/api/equality"
 	k8serrors "k8s.io/apimachinery/pkg/api/errors"
@@ -71,7 +69,7 @@ func (action *monitorAction) Handle(ctx context.Context, binding *v1.Pipe) (*v1.
 		)
 		return target, nil
 	} else if err != nil {
-		return nil, errors.Wrapf(err, "could not load integration for Pipe %q", binding.Name)
+		return nil, fmt.Errorf("could not load integration for Pipe %q: %w", binding.Name, err)
 	}
 
 	operatorIDChanged := v1.GetOperatorIDAnnotation(binding) != "" &&
diff --git a/pkg/controller/pipe/pipe_controller.go b/pkg/controller/pipe/pipe_controller.go
index 741dd48a1..2111a7d33 100644
--- a/pkg/controller/pipe/pipe_controller.go
+++ b/pkg/controller/pipe/pipe_controller.go
@@ -20,7 +20,7 @@ package pipe
 import (
 	"context"
 
-	"k8s.io/apimachinery/pkg/api/errors"
+	k8serrors "k8s.io/apimachinery/pkg/api/errors"
 	"k8s.io/apimachinery/pkg/runtime"
 	"k8s.io/apimachinery/pkg/runtime/schema"
 	"k8s.io/client-go/tools/record"
@@ -157,7 +157,7 @@ func (r *ReconcilePipe) Reconcile(ctx context.Context, request reconcile.Request
 	var instance v1.Pipe
 
 	if err := r.client.Get(ctx, request.NamespacedName, &instance); err != nil {
-		if errors.IsNotFound(err) {
+		if k8serrors.IsNotFound(err) {
 			// Request object not found, could have been deleted after reconcile request.
 			// Owned objects are automatically garbage collected. For additional cleanup
 			// logic use finalizers.
diff --git a/pkg/install/cluster.go b/pkg/install/cluster.go
index 2d2b3858d..945c554f2 100644
--- a/pkg/install/cluster.go
+++ b/pkg/install/cluster.go
@@ -35,7 +35,7 @@ import (
 	"github.com/apache/camel-k/v2/pkg/resources"
 	"github.com/apache/camel-k/v2/pkg/util/knative"
 	"github.com/apache/camel-k/v2/pkg/util/kubernetes"
-	pkgerr "github.com/pkg/errors"
+
 	ctrl "sigs.k8s.io/controller-runtime/pkg/client"
 )
 
@@ -291,42 +291,42 @@ func WaitForAllCrdInstallation(ctx context.Context, clientProvider client.Provid
 
 func areAllCrdInstalled(c client.Client) (int, error) {
 	if ok, err := isCrdInstalled(c, "IntegrationPlatform", "v1"); err != nil {
-		return 1, pkgerr.Wrap(err, "Error installing IntegrationPlatform CRDs")
+		return 1, fmt.Errorf("error installing IntegrationPlatform CRDs: %w", err)
 	} else if !ok {
 		return 1, nil
 	}
 	if ok, err := isCrdInstalled(c, "IntegrationKit", "v1"); err != nil {
-		return 2, pkgerr.Wrap(err, "Error installing IntegrationKit CRDs")
+		return 2, fmt.Errorf("error installing IntegrationKit CRDs: %w", err)
 	} else if !ok {
 		return 2, nil
 	}
 	if ok, err := isCrdInstalled(c, "Integration", "v1"); err != nil {
-		return 3, pkgerr.Wrap(err, "Error installing Integration CRDs")
+		return 3, fmt.Errorf("error installing Integration CRDs: %w", err)
 	} else if !ok {
 		return 3, nil
 	}
 	if ok, err := isCrdInstalled(c, "CamelCatalog", "v1"); err != nil {
-		return 4, pkgerr.Wrap(err, "Error installing CamelCatalog CRDs")
+		return 4, fmt.Errorf("error installing CamelCatalog CRDs: %w", err)
 	} else if !ok {
 		return 4, nil
 	}
 	if ok, err := isCrdInstalled(c, "Build", "v1"); err != nil {
-		return 5, pkgerr.Wrap(err, "Error installing Build CRDs")
+		return 5, fmt.Errorf("error installing Build CRDs: %w", err)
 	} else if !ok {
 		return 5, nil
 	}
 	if ok, err := isCrdInstalled(c, "Kamelet", "v1"); err != nil {
-		return 6, pkgerr.Wrap(err, "Error installing Kamelet CRDs")
+		return 6, fmt.Errorf("error installing Kamelet CRDs: %w", err)
 	} else if !ok {
 		return 6, nil
 	}
 	if ok, err := isCrdInstalled(c, "KameletBinding", "v1alpha1"); err != nil {
-		return 7, pkgerr.Wrap(err, "Error installing KameletBindings CRDs")
+		return 7, fmt.Errorf("error installing KameletBindings CRDs: %w", err)
 	} else if !ok {
 		return 7, nil
 	}
 	if ok, err := isCrdInstalled(c, "Pipe", "v1"); err != nil {
-		return 8, pkgerr.Wrap(err, "Error installing Pipe CRDs")
+		return 8, fmt.Errorf("error installing Pipe CRDs: %w", err)
 	} else if !ok {
 		return 8, nil
 	}
diff --git a/pkg/install/kamelets.go b/pkg/install/kamelets.go
index cf8207eb2..1a7d41ddf 100644
--- a/pkg/install/kamelets.go
+++ b/pkg/install/kamelets.go
@@ -30,7 +30,6 @@ import (
 	"sync"
 	"sync/atomic"
 
-	gerrors "github.com/pkg/errors"
 	"golang.org/x/sync/errgroup"
 	k8serrors "k8s.io/apimachinery/pkg/api/errors"
 	"k8s.io/apimachinery/pkg/runtime"
@@ -104,7 +103,7 @@ func KameletCatalog(ctx context.Context, c client.Client, namespace string) erro
 						err = nil
 					} else {
 						// Unexpected error occurred
-						err = gerrors.Wrap(err, "Unexpected error occurred whilst validating kamelet")
+						err = fmt.Errorf("unexpected error occurred whilst validating kamelet: %w", err)
 						log.Error(err, "Error occurred whilst loading kamelets")
 					}
 				} else {
diff --git a/pkg/install/openshift.go b/pkg/install/openshift.go
index 2acb69f7c..202d8d207 100644
--- a/pkg/install/openshift.go
+++ b/pkg/install/openshift.go
@@ -24,7 +24,7 @@ import (
 
 	"github.com/Masterminds/semver"
 
-	"k8s.io/apimachinery/pkg/api/errors"
+	k8serrors "k8s.io/apimachinery/pkg/api/errors"
 	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
 	"k8s.io/apimachinery/pkg/types"
 
@@ -80,7 +80,7 @@ func OpenShiftConsoleDownloadLink(ctx context.Context, c client.Client) error {
 	existing := &console.ConsoleCLIDownload{}
 	err = c.Get(ctx, types.NamespacedName{Name: KamelCLIDownloadName}, existing)
 	if err != nil {
-		if errors.IsNotFound(err) {
+		if k8serrors.IsNotFound(err) {
 			existing = nil
 		} else {
 			return err
@@ -104,7 +104,7 @@ func OpenShiftConsoleDownloadLink(ctx context.Context, c client.Client) error {
 			// Else delete the older version
 			err = c.Delete(ctx, existing)
 			if err != nil {
-				if errors.IsForbidden(err) {
+				if k8serrors.IsForbidden(err) {
 					// Let's just skip the ConsoleCLIDownload resource creation
 					return nil
 				}
diff --git a/pkg/install/operator.go b/pkg/install/operator.go
index 96adaf885..d3d78c27c 100644
--- a/pkg/install/operator.go
+++ b/pkg/install/operator.go
@@ -19,10 +19,10 @@ package install
 
 import (
 	"context"
+	"errors"
 	"fmt"
 	"strings"
 
-	"github.com/pkg/errors"
 	"github.com/spf13/cobra"
 
 	appsv1 "k8s.io/api/apps/v1"
@@ -355,7 +355,8 @@ func OperatorOrCollect(ctx context.Context, cmd *cobra.Command, c client.Client,
 			switch {
 			case k8serrors.IsForbidden(err):
 				fmt.Fprintln(cmd.ErrOrStderr(), "Warning: the creation of monitoring resources is not allowed. Try installing as cluster-admin to allow the creation of monitoring resources.")
-			case meta.IsNoMatchError(errors.Cause(err)):
+				// TU to check ?
+			case meta.IsNoMatchError(errors.Unwrap(err)):
 				fmt.Fprintln(cmd.ErrOrStderr(), "Warning: the creation of the monitoring resources failed: ", err)
 			default:
 				return err
@@ -415,7 +416,7 @@ func installNamespacedRoleBinding(ctx context.Context, c client.Client, collecti
 		return err
 	}
 	if yaml == "" {
-		return errors.Errorf("resource file %v not found", path)
+		return fmt.Errorf("resource file %v not found", path)
 	}
 	obj, err := kubernetes.LoadResourceFromYaml(c.GetScheme(), yaml)
 	if err != nil {
@@ -466,7 +467,7 @@ func installClusterRoleBinding(ctx context.Context, c client.Client, collection
 
 		existing = nil
 		if content == "" {
-			return errors.Errorf("resource file %v not found", path)
+			return fmt.Errorf("resource file %v not found", path)
 		}
 
 		obj, err := kubernetes.LoadResourceFromYaml(c.GetScheme(), content)
diff --git a/pkg/kamelet/initialize.go b/pkg/kamelet/initialize.go
index 20481b71c..cce099784 100644
--- a/pkg/kamelet/initialize.go
+++ b/pkg/kamelet/initialize.go
@@ -25,7 +25,6 @@ import (
 
 	v1 "github.com/apache/camel-k/v2/pkg/apis/camel/v1"
 
-	"github.com/pkg/errors"
 	corev1 "k8s.io/api/core/v1"
 )
 
@@ -88,7 +87,7 @@ func recomputeProperties(kamelet *v1.Kamelet) error {
 			d := json.NewDecoder(bytes.NewReader(v.Default.RawMessage))
 			d.UseNumber()
 			if err := d.Decode(&val); err != nil {
-				return errors.Wrapf(err, "cannot decode default value for property %q", k)
+				return fmt.Errorf("cannot decode default value for property %q: %w", k, err)
 			}
 			defValue = fmt.Sprintf("%v", val)
 		}
diff --git a/pkg/platform/defaults.go b/pkg/platform/defaults.go
index 8dbf8a29d..19c237b63 100644
--- a/pkg/platform/defaults.go
+++ b/pkg/platform/defaults.go
@@ -19,12 +19,11 @@ package platform
 
 import (
 	"context"
+	"fmt"
 	"runtime"
 	"strings"
 	"time"
 
-	"github.com/pkg/errors"
-
 	corev1 "k8s.io/api/core/v1"
 	rbacv1 "k8s.io/api/rbac/v1"
 	k8serrors "k8s.io/apimachinery/pkg/api/errors"
@@ -94,7 +93,7 @@ func ConfigureDefaults(ctx context.Context, c client.Client, p *v1.IntegrationPl
 
 	if p.Status.Build.BuildStrategy == v1.BuildStrategyPod {
 		if err := CreateBuilderServiceAccount(ctx, c, p); err != nil {
-			return errors.Wrap(err, "cannot ensure service account is present")
+			return fmt.Errorf("cannot ensure service account is present: %w", err)
 		}
 	}
 
diff --git a/pkg/resources/resources_support.go b/pkg/resources/resources_support.go
index b8c17aac8..6ce80297b 100644
--- a/pkg/resources/resources_support.go
+++ b/pkg/resources/resources_support.go
@@ -19,6 +19,7 @@ package resources
 
 import (
 	"bytes"
+	"fmt"
 	"io"
 	"net/http"
 	"os"
@@ -28,14 +29,12 @@ import (
 	"text/template"
 
 	"github.com/apache/camel-k/v2/pkg/util"
-
-	"github.com/pkg/errors"
 )
 
-//
-//go:generate go run ../../cmd/util/vfs-gen resources config
 //
 // ResourceAsString returns the named resource content as string.
+//
+//go:generate go run ../../cmd/util/vfs-gen resources config
 func ResourceAsString(name string) (string, error) {
 	data, err := Resource(name)
 	return string(data), err
@@ -51,13 +50,13 @@ func Resource(name string) ([]byte, error) {
 
 	file, err := openAsset(name)
 	if err != nil {
-		return nil, errors.Wrapf(err, "cannot access resource file %s", name)
+		return nil, fmt.Errorf("cannot access resource file %s: %w", name, err)
 	}
 
 	data, err := io.ReadAll(file)
 	if err != nil {
 		_ = file.Close()
-		return nil, errors.Wrapf(err, "cannot access resource file %s", name)
+		return nil, fmt.Errorf("cannot access resource file %s: %w", name, err)
 	}
 
 	return data, file.Close()
@@ -124,7 +123,7 @@ func Resources(dirName string) ([]string, error) {
 			return nil, nil
 		}
 
-		return nil, errors.Wrapf(err, "error while listing resource files %s", dirName)
+		return nil, fmt.Errorf("error while listing resource files %s: %w", dirName, err)
 	}
 
 	info, err := dir.Stat()
@@ -133,13 +132,13 @@ func Resources(dirName string) ([]string, error) {
 	}
 	if !info.IsDir() {
 		util.CloseQuietly(dir)
-		return nil, errors.Wrapf(err, "location %s is not a directory", dirName)
+		return nil, fmt.Errorf("location %s is not a directory: %w", dirName, err)
 	}
 
 	files, err := dir.Readdir(-1)
 	if err != nil {
 		util.CloseQuietly(dir)
-		return nil, errors.Wrapf(err, "error while listing files on directory %s", dirName)
+		return nil, fmt.Errorf("error while listing files on directory %s: %w", dirName, err)
 	}
 
 	var res []string
diff --git a/pkg/trait/camel.go b/pkg/trait/camel.go
index 83ca30532..8974b7879 100644
--- a/pkg/trait/camel.go
+++ b/pkg/trait/camel.go
@@ -19,12 +19,11 @@ package trait
 
 import (
 	"context"
+	"errors"
 	"fmt"
 	"strconv"
 	"strings"
 
-	"github.com/pkg/errors"
-
 	corev1 "k8s.io/api/core/v1"
 	k8serrors "k8s.io/apimachinery/pkg/api/errors"
 	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
@@ -149,13 +148,14 @@ func (t *camelTrait) loadOrCreateCatalog(e *Environment, runtimeVersion string)
 					catalog, err = camel.LoadCatalog(e.Ctx, e.Client, ns, runtime)
 					if err != nil {
 						// unexpected error
-						return errors.Wrapf(err, "catalog %q already exists but unable to load", catalogName)
+						return fmt.Errorf("catalog %q already exists but unable to load: %w", catalogName, err)
 					}
 				} else {
-					return errors.Wrapf(err, "unable to create catalog runtime=%s, provider=%s, name=%s",
+					return fmt.Errorf("unable to create catalog runtime=%s, provider=%s, name=%s: %w",
 						runtime.Version,
 						runtime.Provider,
-						catalogName)
+						catalogName, err)
+
 				}
 			}
 		}
diff --git a/pkg/trait/gc.go b/pkg/trait/gc.go
index fef7fdee4..3beeb88d9 100644
--- a/pkg/trait/gc.go
+++ b/pkg/trait/gc.go
@@ -19,12 +19,12 @@ package trait
 
 import (
 	"context"
+	"fmt"
 	"strconv"
 	"strings"
 	"sync"
 	"time"
 
-	"github.com/pkg/errors"
 	"golang.org/x/time/rate"
 
 	authorization "k8s.io/api/authorization/v1"
@@ -101,13 +101,13 @@ func (t *gcTrait) Apply(e *Environment) error {
 func (t *gcTrait) garbageCollectResources(e *Environment) error {
 	deletableGVKs, err := t.getDeletableTypes(e)
 	if err != nil {
-		return errors.Wrap(err, "cannot discover GVK types")
+		return fmt.Errorf("cannot discover GVK types: %w", err)
 	}
 
 	integration, _ := labels.NewRequirement(v1.IntegrationLabel, selection.Equals, []string{e.Integration.Name})
 	generation, err := labels.NewRequirement("camel.apache.org/generation", selection.LessThan, []string{strconv.FormatInt(e.Integration.GetGeneration(), 10)})
 	if err != nil {
-		return errors.Wrap(err, "cannot determine generation requirement")
+		return fmt.Errorf("cannot determine generation requirement: %w", err)
 	}
 	selector := labels.NewSelector().
 		Add(*integration).
@@ -130,7 +130,7 @@ func (t *gcTrait) deleteEachOf(ctx context.Context, deletableGVKs map[schema.Gro
 		}
 		if err := t.Client.List(ctx, &resources, options...); err != nil {
 			if !k8serrors.IsNotFound(err) {
-				return errors.Wrap(err, "cannot list child resources")
+				return fmt.Errorf("cannot list child resources: %w", err)
 			}
 			continue
 		}
diff --git a/pkg/trait/init.go b/pkg/trait/init.go
index 7d52210f8..d941af7c1 100644
--- a/pkg/trait/init.go
+++ b/pkg/trait/init.go
@@ -18,10 +18,9 @@ limitations under the License.
 package trait
 
 import (
+	"errors"
 	"sort"
 
-	"github.com/pkg/errors"
-
 	"k8s.io/utils/pointer"
 
 	v1 "github.com/apache/camel-k/v2/pkg/apis/camel/v1"
diff --git a/pkg/trait/jvm.go b/pkg/trait/jvm.go
index cc78c1f1c..d7d50f7b3 100644
--- a/pkg/trait/jvm.go
+++ b/pkg/trait/jvm.go
@@ -24,7 +24,6 @@ import (
 	"sort"
 	"strings"
 
-	"github.com/pkg/errors"
 	"github.com/scylladb/go-set/strset"
 
 	infp "gopkg.in/inf.v0"
@@ -87,7 +86,7 @@ func (t *jvmTrait) Apply(e *Environment) error {
 		ns := e.Integration.GetIntegrationKitNamespace(e.Platform)
 		k := v1.NewIntegrationKit(ns, name)
 		if err := t.Client.Get(e.Ctx, ctrl.ObjectKeyFromObject(k), k); err != nil {
-			return errors.Wrapf(err, "unable to find integration kit %s/%s, %s", ns, name, err)
+			return fmt.Errorf("unable to find integration kit %s/%s, %s: %w", ns, name, err, err)
 		}
 		kit = k
 	}
diff --git a/pkg/trait/knative.go b/pkg/trait/knative.go
index 1579c0a1b..4a06f4430 100644
--- a/pkg/trait/knative.go
+++ b/pkg/trait/knative.go
@@ -24,8 +24,6 @@ import (
 	"sort"
 	"strings"
 
-	"github.com/pkg/errors"
-
 	corev1 "k8s.io/api/core/v1"
 	k8serrors "k8s.io/apimachinery/pkg/api/errors"
 	"k8s.io/apimachinery/pkg/runtime"
@@ -217,7 +215,7 @@ func (t *knativeTrait) Apply(e *Environment) error {
 
 		conf, err := env.Serialize()
 		if err != nil {
-			return errors.Wrap(err, "unable to fetch environment configuration")
+			return fmt.Errorf("unable to fetch environment configuration: %w", err)
 		}
 
 		envvar.SetVal(&e.EnvVars, "CAMEL_KNATIVE_CONFIGURATION", conf)
@@ -556,16 +554,16 @@ func (t *knativeTrait) withServiceDo(
 		} else {
 			actualRef, err = knativeutil.GetAddressableReference(e.Ctx, t.Client, possibleRefs, e.Integration.Namespace, ref.Name)
 			if err != nil && k8serrors.IsNotFound(err) {
-				return errors.Errorf("cannot find %s", serviceType.ResourceDescription(ref.Name))
+				return fmt.Errorf("cannot find %s", serviceType.ResourceDescription(ref.Name))
 			} else if err != nil {
-				return errors.Wrapf(err, "error looking up %s", serviceType.ResourceDescription(ref.Name))
+				return fmt.Errorf("error looking up %s: %w", serviceType.ResourceDescription(ref.Name), err)
 			}
 		}
 
 		urlProvider := func() (*url.URL, error) {
 			targetURL, err := knativeutil.GetSinkURL(e.Ctx, t.Client, actualRef, e.Integration.Namespace)
 			if err != nil {
-				return nil, errors.Wrapf(err, "cannot determine address of %s", serviceType.ResourceDescription(ref.Name))
+				return nil, fmt.Errorf("cannot determine address of %s: %w", serviceType.ResourceDescription(ref.Name), err)
 			}
 			t.L.Infof("Found URL for %s: %s", serviceType.ResourceDescription(ref.Name), targetURL.String())
 			return targetURL, nil
@@ -573,7 +571,7 @@ func (t *knativeTrait) withServiceDo(
 
 		err = gen(actualRef, serviceURI, urlProvider)
 		if err != nil {
-			return errors.Wrapf(err, "unexpected error while executing handler for %s", serviceType.ResourceDescription(ref.Name))
+			return fmt.Errorf("unexpected error while executing handler for %s: %w", serviceType.ResourceDescription(ref.Name), err)
 		}
 	}
 	return nil
diff --git a/pkg/trait/openapi.go b/pkg/trait/openapi.go
index 558c77684..09a478066 100644
--- a/pkg/trait/openapi.go
+++ b/pkg/trait/openapi.go
@@ -19,14 +19,13 @@ package trait
 
 import (
 	"context"
+	"errors"
 	"fmt"
 	"os"
 	"path/filepath"
 	"strconv"
 	"strings"
 
-	"github.com/pkg/errors"
-
 	corev1 "k8s.io/api/core/v1"
 	k8serrors "k8s.io/apimachinery/pkg/api/errors"
 	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
@@ -132,7 +131,7 @@ func (t *openAPITrait) generateFromDataSpecs(e *Environment, tmpDir string, spec
 		generatedSourceName := strings.TrimSuffix(resource.Name, filepath.Ext(resource.Name)) + ".xml"
 		// Generate configmap or reuse existing one
 		if err := t.generateOpenAPIConfigMap(e, resource, tmpDir, generatedContentName); err != nil {
-			return nil, errors.Wrapf(err, "cannot generate configmap for openapi resource %s", resource.Name)
+			return nil, fmt.Errorf("cannot generate configmap for openapi resource %s: %w", resource.Name, err)
 		}
 		if e.Integration.Status.GeneratedSources != nil {
 			// Filter out the previously generated source
diff --git a/pkg/trait/pull_secret.go b/pkg/trait/pull_secret.go
index be4f6e426..640d9a341 100644
--- a/pkg/trait/pull_secret.go
+++ b/pkg/trait/pull_secret.go
@@ -20,8 +20,6 @@ package trait
 import (
 	"fmt"
 
-	"github.com/pkg/errors"
-
 	corev1 "k8s.io/api/core/v1"
 	rbacv1 "k8s.io/api/rbac/v1"
 	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
@@ -110,7 +108,7 @@ func (t *pullSecretTrait) delegateImagePuller(e *Environment) error {
 	// (different from the integration namespace when delegation is enabled).
 	rb := t.newImagePullerRoleBinding(e)
 	if _, err := kubernetes.ReplaceResource(e.Ctx, e.Client, rb); err != nil {
-		return errors.Wrap(err, "error during the creation of the system:image-puller delegating role binding")
+		return fmt.Errorf("error during the creation of the system:image-puller delegating role binding: %w", err)
 	}
 	return nil
 }
diff --git a/pkg/trait/trait.go b/pkg/trait/trait.go
index 3c484d710..ec4a9ca3c 100644
--- a/pkg/trait/trait.go
+++ b/pkg/trait/trait.go
@@ -19,8 +19,8 @@ package trait
 
 import (
 	"context"
-
-	"github.com/pkg/errors"
+	"errors"
+	"fmt"
 
 	corev1 "k8s.io/api/core/v1"
 	k8serrors "k8s.io/apimachinery/pkg/api/errors"
@@ -46,7 +46,7 @@ func Apply(ctx context.Context, c client.Client, integration *v1.Integration, ki
 
 	environment, err := newEnvironment(ctx, c, integration, kit)
 	if err != nil {
-		return nil, errors.Wrap(err, "error creating trait environment")
+		return nil, fmt.Errorf("error creating trait environment: %w", err)
 	}
 
 	catalog := NewCatalog(c)
@@ -56,14 +56,14 @@ func Apply(ctx context.Context, c client.Client, integration *v1.Integration, ki
 
 	// invoke the trait framework to determine the needed resources
 	if err := catalog.apply(environment); err != nil {
-		return nil, errors.Wrap(err, "error during trait customization")
+		return nil, fmt.Errorf("error during trait customization: %w", err)
 	}
 
 	// execute post actions registered by traits
 	for _, postAction := range environment.PostActions {
 		err := postAction(environment)
 		if err != nil {
-			return nil, errors.Wrap(err, "error executing post actions")
+			return nil, fmt.Errorf("error executing post actions: %w", err)
 		}
 	}
 
diff --git a/pkg/trait/trait_catalog.go b/pkg/trait/trait_catalog.go
index ec36f8eea..0c9697337 100644
--- a/pkg/trait/trait_catalog.go
+++ b/pkg/trait/trait_catalog.go
@@ -18,12 +18,13 @@ limitations under the License.
 package trait
 
 import (
+	"errors"
+	"fmt"
 	"reflect"
 	"sort"
 	"strings"
 
 	"github.com/fatih/structs"
-	"github.com/pkg/errors"
 
 	v1 "github.com/apache/camel-k/v2/pkg/apis/camel/v1"
 	"github.com/apache/camel-k/v2/pkg/client"
@@ -119,7 +120,7 @@ func (c *Catalog) apply(environment *Environment) error {
 			for _, processor := range environment.PostStepProcessors {
 				err := processor(environment)
 				if err != nil {
-					return errors.Wrap(err, "error executing post step action")
+					return fmt.Errorf("error executing post step action: %w", err)
 				}
 			}
 		}
@@ -138,7 +139,7 @@ func (c *Catalog) apply(environment *Environment) error {
 	for _, processor := range environment.PostProcessors {
 		err := processor(environment)
 		if err != nil {
-			return errors.Wrap(err, "error executing post processor")
+			return fmt.Errorf("error executing post processor: %w", err)
 		}
 	}
 
diff --git a/pkg/trait/trait_configure.go b/pkg/trait/trait_configure.go
index bc7b7284b..12091fb12 100644
--- a/pkg/trait/trait_configure.go
+++ b/pkg/trait/trait_configure.go
@@ -19,12 +19,12 @@ package trait
 
 import (
 	"encoding/json"
+	"errors"
 	"fmt"
 	"reflect"
 	"strings"
 
 	"github.com/mitchellh/mapstructure"
-	"github.com/pkg/errors"
 
 	v1 "github.com/apache/camel-k/v2/pkg/apis/camel/v1"
 	"github.com/apache/camel-k/v2/pkg/util"
@@ -170,7 +170,7 @@ func configureTrait(id string, config map[string]interface{}, trait interface{})
 			if v, ok := data.(string); ok && strings.HasPrefix(v, "[") && strings.HasSuffix(v, "]") {
 				var value interface{}
 				if err := json.Unmarshal([]byte(v), &value); err != nil {
-					return nil, errors.Wrap(err, "could not decode JSON array for configuring trait property")
+					return nil, fmt.Errorf("could not decode JSON array for configuring trait property: %w", err)
 				}
 				return value, nil
 			}
@@ -189,7 +189,7 @@ func configureTrait(id string, config map[string]interface{}, trait interface{})
 		},
 	)
 	if err != nil {
-		return errors.Wrapf(err, "error while decoding trait configuration %q", id)
+		return fmt.Errorf("error while decoding trait configuration %q: %w", id, err)
 	}
 
 	return decoder.Decode(config)
diff --git a/pkg/trait/trait_types.go b/pkg/trait/trait_types.go
index bb318270a..8a58e2105 100644
--- a/pkg/trait/trait_types.go
+++ b/pkg/trait/trait_types.go
@@ -25,8 +25,6 @@ import (
 	"sort"
 	"strings"
 
-	"github.com/pkg/errors"
-
 	appsv1 "k8s.io/api/apps/v1"
 	batchv1 "k8s.io/api/batch/v1"
 	corev1 "k8s.io/api/core/v1"
@@ -377,7 +375,7 @@ func (e *Environment) computeApplicationProperties() (*corev1.ConfigMap, error)
 	// application properties
 	applicationProperties, err := property.EncodePropertyFile(e.ApplicationProperties)
 	if err != nil {
-		return nil, errors.Wrapf(err, "could not compute application properties")
+		return nil, fmt.Errorf("could not compute application properties: %w", err)
 	}
 
 	if applicationProperties != "" {
diff --git a/pkg/trait/util.go b/pkg/trait/util.go
index 444179d57..0de30bf82 100644
--- a/pkg/trait/util.go
+++ b/pkg/trait/util.go
@@ -20,13 +20,13 @@ package trait
 import (
 	"context"
 	"encoding/json"
+	"errors"
 	"fmt"
 	"reflect"
 	"regexp"
 	"sort"
 	"strings"
 
-	"github.com/pkg/errors"
 	"github.com/scylladb/go-set/strset"
 
 	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
@@ -312,7 +312,7 @@ func MigrateLegacyConfiguration(trait map[string]interface{}) error {
 		}
 		delete(trait, "configuration")
 	} else {
-		return errors.Errorf(`unexpected type for "configuration" field: %v`, reflect.TypeOf(trait["configuration"]))
+		return fmt.Errorf(`unexpected type for "configuration" field: %v`, reflect.TypeOf(trait["configuration"]))
 	}
 
 	return nil
diff --git a/pkg/util/command.go b/pkg/util/command.go
index 37d3262de..d132194a2 100644
--- a/pkg/util/command.go
+++ b/pkg/util/command.go
@@ -24,7 +24,6 @@ import (
 	"io"
 	"os/exec"
 
-	"github.com/pkg/errors"
 	"golang.org/x/sync/errgroup"
 )
 
@@ -49,7 +48,7 @@ func RunAndLog(ctx context.Context, cmd *exec.Cmd, stdOutF func(string) string,
 		scanOutMsg = scan(stdOut, stdOutF)
 		scanErrMsg = scan(stdErr, stdErrF)
 
-		return errors.Wrapf(err, formatErr(scanOutMsg, scanErrMsg))
+		return fmt.Errorf(formatErr(scanOutMsg, scanErrMsg)+": %w", err)
 	}
 	g, _ := errgroup.WithContext(ctx)
 	g.Go(func() error {
@@ -61,10 +60,10 @@ func RunAndLog(ctx context.Context, cmd *exec.Cmd, stdOutF func(string) string,
 		return nil
 	})
 	if err = g.Wait(); err != nil {
-		return errors.Wrapf(err, formatErr(scanOutMsg, scanErrMsg))
+		return fmt.Errorf(formatErr(scanOutMsg, scanErrMsg)+": %w", err)
 	}
 	if err = cmd.Wait(); err != nil {
-		return errors.Wrapf(err, formatErr(scanOutMsg, scanErrMsg))
+		return fmt.Errorf(formatErr(scanOutMsg, scanErrMsg)+": %w", err)
 	}
 
 	return nil
diff --git a/pkg/util/docker/docker.go b/pkg/util/docker/docker.go
index ef212a5a4..f4eb5e39c 100644
--- a/pkg/util/docker/docker.go
+++ b/pkg/util/docker/docker.go
@@ -18,13 +18,13 @@ limitations under the License.
 package docker
 
 import (
+	"errors"
 	"os/exec"
 	"path/filepath"
 	"strings"
 
 	"github.com/apache/camel-k/v2/pkg/util"
 	"github.com/apache/camel-k/v2/pkg/util/defaults"
-	"github.com/pkg/errors"
 )
 
 // CreateBaseImageDockerFile --.
diff --git a/pkg/util/kubernetes/discovery.go b/pkg/util/kubernetes/discovery.go
index 38a0cadb1..2b0d47fad 100644
--- a/pkg/util/kubernetes/discovery.go
+++ b/pkg/util/kubernetes/discovery.go
@@ -18,14 +18,14 @@ limitations under the License.
 package kubernetes
 
 import (
-	"k8s.io/apimachinery/pkg/api/errors"
+	k8serrors "k8s.io/apimachinery/pkg/api/errors"
 	"k8s.io/client-go/kubernetes"
 )
 
 func IsAPIResourceInstalled(c kubernetes.Interface, groupVersion string, kind string) (bool, error) {
 	resources, err := c.Discovery().ServerResourcesForGroupVersion(groupVersion)
 	if err != nil {
-		if errors.IsNotFound(err) {
+		if k8serrors.IsNotFound(err) {
 			return false, nil
 		}
 		return false, err
diff --git a/pkg/util/kubernetes/log/pod_scraper.go b/pkg/util/kubernetes/log/pod_scraper.go
index 96b63495c..765b62df8 100644
--- a/pkg/util/kubernetes/log/pod_scraper.go
+++ b/pkg/util/kubernetes/log/pod_scraper.go
@@ -20,13 +20,14 @@ package log
 import (
 	"bufio"
 	"context"
+	"errors"
 	"io"
 	"time"
 
 	"go.uber.org/multierr"
 
 	klog "github.com/apache/camel-k/v2/pkg/util/log"
-	"github.com/pkg/errors"
+
 	corev1 "k8s.io/api/core/v1"
 	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
 	"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
diff --git a/pkg/util/kubernetes/replace.go b/pkg/util/kubernetes/replace.go
index 25a0868a2..2f0ee67bb 100644
--- a/pkg/util/kubernetes/replace.go
+++ b/pkg/util/kubernetes/replace.go
@@ -21,8 +21,6 @@ import (
 	"context"
 	"fmt"
 
-	"github.com/pkg/errors"
-
 	corev1 "k8s.io/api/core/v1"
 	k8serrors "k8s.io/apimachinery/pkg/api/errors"
 	"k8s.io/apimachinery/pkg/runtime"
@@ -58,7 +56,7 @@ func ReplaceResource(ctx context.Context, c client.Client, res ctrl.Object) (boo
 		err = c.Update(ctx, res)
 	}
 	if err != nil {
-		return replaced, errors.Wrap(err, "could not create or replace "+findResourceDetails(res))
+		return replaced, fmt.Errorf("could not create or replace "+findResourceDetails(res)+": %w", err)
 	}
 	return replaced, nil
 }
diff --git a/pkg/util/kubernetes/resolver.go b/pkg/util/kubernetes/resolver.go
index 3ca99dd28..a6d47be14 100644
--- a/pkg/util/kubernetes/resolver.go
+++ b/pkg/util/kubernetes/resolver.go
@@ -23,7 +23,7 @@ import (
 
 	v1 "github.com/apache/camel-k/v2/pkg/apis/camel/v1"
 	"github.com/apache/camel-k/v2/pkg/util/gzip"
-	"github.com/pkg/errors"
+
 	corev1 "k8s.io/api/core/v1"
 	controller "sigs.k8s.io/controller-runtime/pkg/client"
 )
@@ -85,7 +85,7 @@ func Resolve(data *v1.DataSpec, mapLookup func(string) (*corev1.ConfigMap, error
 		var uncompressed []byte
 		var err error
 		if uncompressed, err = gzip.UncompressBase64(cnt); err != nil {
-			return errors.Wrap(err, "error while uncompressing data")
+			return fmt.Errorf("error while uncompressing data: %w", err)
 		}
 		data.Compression = false
 		data.Content = string(uncompressed)
diff --git a/pkg/util/maven/maven_command.go b/pkg/util/maven/maven_command.go
index da2473b31..49b49d6db 100644
--- a/pkg/util/maven/maven_command.go
+++ b/pkg/util/maven/maven_command.go
@@ -19,6 +19,7 @@ package maven
 
 import (
 	"context"
+	"errors"
 	"fmt"
 	"io"
 	"os"
@@ -29,8 +30,6 @@ import (
 	"strconv"
 	"strings"
 
-	"github.com/pkg/errors"
-
 	"github.com/apache/camel-k/v2/pkg/util"
 	"github.com/apache/camel-k/v2/pkg/util/log"
 )
diff --git a/pkg/util/olm/operator.go b/pkg/util/olm/operator.go
index a58c73f6d..4b3d9102d 100644
--- a/pkg/util/olm/operator.go
+++ b/pkg/util/olm/operator.go
@@ -22,8 +22,6 @@ import (
 	"fmt"
 	"strings"
 
-	"github.com/pkg/errors"
-
 	v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
 	"k8s.io/kubectl/pkg/cmd/set/env"
 
@@ -182,19 +180,19 @@ func Install(ctx context.Context, client client.Client, namespace string, global
 	// Additional configuration
 	err = maybeSetTolerations(&sub, tolerations)
 	if err != nil {
-		return false, errors.Wrap(err, "could not set tolerations")
+		return false, fmt.Errorf("could not set tolerations: %w", err)
 	}
 	err = maybeSetNodeSelectors(&sub, nodeSelectors)
 	if err != nil {
-		return false, errors.Wrap(err, "could not set node selectors")
+		return false, fmt.Errorf("could not set node selectors: %w", err)
 	}
 	err = maybeSetResourcesRequirements(&sub, resourcesRequirements)
 	if err != nil {
-		return false, errors.Wrap(err, "could not set resources requirements")
+		return false, fmt.Errorf("could not set resources requirements: %w", err)
 	}
 	err = maybeSetEnvVars(&sub, envVars)
 	if err != nil {
-		return false, errors.Wrap(err, "could not set environment variables")
+		return false, fmt.Errorf("could not set environment variables: %w", err)
 	}
 
 	if collection != nil {
@@ -221,9 +219,10 @@ func Install(ctx context.Context, client client.Client, namespace string, global
 			if collection != nil {
 				collection.Add(group)
 			} else if err := client.Create(ctx, group); err != nil {
-				return false, errors.Wrap(err, fmt.Sprintf("namespace %s has no operator group defined and "+
+				return false, fmt.Errorf("namespace %s has no operator group defined and "+
 					"current user is not able to create it. "+
-					"Make sure you have the right roles to install operators from OLM", namespace))
+					"Make sure you have the right roles to install operators from OLM"+": %w", namespace, err)
+
 			}
 		}
 	}
diff --git a/pkg/util/openshift/openshift.go b/pkg/util/openshift/openshift.go
index 66da20603..da3f78f6f 100644
--- a/pkg/util/openshift/openshift.go
+++ b/pkg/util/openshift/openshift.go
@@ -18,14 +18,14 @@ limitations under the License.
 package openshift
 
 import (
-	"k8s.io/apimachinery/pkg/api/errors"
+	k8serrors "k8s.io/apimachinery/pkg/api/errors"
 	"k8s.io/client-go/kubernetes"
 )
 
 // IsOpenShift returns true if we are connected to a OpenShift cluster.
 func IsOpenShift(client kubernetes.Interface) (bool, error) {
 	_, err := client.Discovery().ServerResourcesForGroupVersion("image.openshift.io/v1")
-	if err != nil && errors.IsNotFound(err) {
+	if err != nil && k8serrors.IsNotFound(err) {
 		return false, nil
 	} else if err != nil {
 		return false, err
diff --git a/pkg/util/property/property.go b/pkg/util/property/property.go
index 87fcc1abf..a41fd0c76 100644
--- a/pkg/util/property/property.go
+++ b/pkg/util/property/property.go
@@ -19,10 +19,10 @@ package property
 
 import (
 	"bytes"
+	"fmt"
 	"strings"
 
 	"github.com/magiconair/properties"
-	"github.com/pkg/errors"
 )
 
 // EncodePropertyFileEntry converts the given key/value pair into a .properties file entry.
@@ -48,7 +48,7 @@ func EncodePropertyFile(sourceProperties map[string]string) (string, error) {
 	buf := new(bytes.Buffer)
 	_, err := props.Write(buf, properties.UTF8)
 	if err != nil {
-		return "", errors.Wrapf(err, "could not compute application properties")
+		return "", fmt.Errorf("could not compute application properties: %w", err)
 	}
 	return buf.String(), nil
 }
diff --git a/pkg/util/reference/reference.go b/pkg/util/reference/reference.go
index d3f506f1e..39b5e87fc 100644
--- a/pkg/util/reference/reference.go
+++ b/pkg/util/reference/reference.go
@@ -18,6 +18,7 @@ limitations under the License.
 package reference
 
 import (
+	"errors"
 	"fmt"
 	"net/url"
 	"regexp"
@@ -25,7 +26,7 @@ import (
 	"unicode"
 
 	v1 "github.com/apache/camel-k/v2/pkg/apis/camel/v1"
-	"github.com/pkg/errors"
+
 	corev1 "k8s.io/api/core/v1"
 	eventingv1 "knative.dev/eventing/pkg/apis/eventing/v1"
 	messagingv1 "knative.dev/eventing/pkg/apis/messaging/v1"
@@ -105,11 +106,11 @@ func (c *Converter) PropertiesFromString(str string) (map[string]string, error)
 			}
 			k, errkey := url.QueryUnescape(kv[0])
 			if errkey != nil {
-				return nil, errors.Wrapf(errkey, "cannot unescape key %q", kv[0])
+				return nil, fmt.Errorf("cannot unescape key %q: %w", kv[0], errkey)
 			}
 			v, errval := url.QueryUnescape(kv[1])
 			if errval != nil {
-				return nil, errors.Wrapf(errval, "cannot unescape value %q", kv[1])
+				return nil, fmt.Errorf("cannot unescape value %q: %w", kv[1], errval)
 			}
 			res[k] = v
 		}
diff --git a/pkg/util/util.go b/pkg/util/util.go
index 28de402f3..e0bede95f 100644
--- a/pkg/util/util.go
+++ b/pkg/util/util.go
@@ -21,6 +21,7 @@ import (
 	"bytes"
 	"encoding/json"
 	"encoding/xml"
+	"errors"
 	"fmt"
 	"io"
 	"io/fs"
@@ -38,7 +39,6 @@ import (
 
 	yaml2 "gopkg.in/yaml.v2"
 
-	"github.com/pkg/errors"
 	"github.com/scylladb/go-set/strset"
 )
 
@@ -490,7 +490,7 @@ func MapToYAML(src map[string]interface{}) ([]byte, error) {
 func WriteToFile(filePath string, fileContents string) error {
 	err := os.WriteFile(filePath, []byte(fileContents), 0o400)
 	if err != nil {
-		return errors.Errorf("error writing file: %v", filePath)
+		return fmt.Errorf("error writing file: %v", filePath)
 	}
 
 	return nil
@@ -499,11 +499,11 @@ func WriteToFile(filePath string, fileContents string) error {
 func GetEnvironmentVariable(variable string) (string, error) {
 	value, isPresent := os.LookupEnv(variable)
 	if !isPresent {
-		return "", errors.Errorf("environment variable %v does not exist", variable)
+		return "", fmt.Errorf("environment variable %v does not exist", variable)
 	}
 
 	if value == "" {
-		return "", errors.Errorf("environment variable %v is not set", variable)
+		return "", fmt.Errorf("environment variable %v is not set", variable)
 	}
 
 	return value, nil
@@ -615,18 +615,18 @@ func WriteFileWithContent(filePath string, content []byte) error {
 	// Create dir if not present
 	err := os.MkdirAll(fileDir, 0o700)
 	if err != nil {
-		return errors.Wrap(err, "could not create dir for file "+filePath)
+		return fmt.Errorf("could not create dir for file "+filePath+": %w", err)
 	}
 
 	// Create file
 	file, err := os.Create(filePath)
 	if err != nil {
-		return errors.Wrap(err, "could not create file "+filePath)
+		return fmt.Errorf("could not create file "+filePath+": %w", err)
 	}
 
 	_, err = file.Write(content)
 	if err != nil {
-		err = errors.Wrap(err, "could not write to file "+filePath)
+		err = fmt.Errorf("could not write to file "+filePath+": %w", err)
 	}
 
 	return Close(err, file)
@@ -713,7 +713,7 @@ func NavigateConfigTree(current interface{}, nodes []string) (interface{}, error
 		}
 		pos, err := strconv.Atoi(nodes[0][1 : len(nodes[0])-1])
 		if err != nil {
-			return nil, errors.Wrapf(err, "value %q inside brackets is not numeric", nodes[0])
+			return nil, fmt.Errorf("value %q inside brackets is not numeric: %w", nodes[0], err)
 		}
 		var next interface{}
 		if len(*c) > pos && (*c)[pos] != nil {


Test patch:
diff --git a/addons/keda/keda_test.go b/addons/keda/keda_test.go
index 8a5f64c49..73d60d4ea 100644
--- a/addons/keda/keda_test.go
+++ b/addons/keda/keda_test.go
@@ -20,6 +20,7 @@ package keda
 import (
 	"context"
 	"encoding/json"
+	"fmt"
 	"testing"
 
 	"github.com/apache/camel-k/v2/addons/keda/duck/v1alpha1"
@@ -29,7 +30,7 @@ import (
 	"github.com/apache/camel-k/v2/pkg/util/camel"
 	"github.com/apache/camel-k/v2/pkg/util/kubernetes"
 	"github.com/apache/camel-k/v2/pkg/util/test"
-	"github.com/pkg/errors"
+
 	"github.com/stretchr/testify/assert"
 	corev1 "k8s.io/api/core/v1"
 	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
@@ -438,7 +439,7 @@ func getSecret(e *trait.Environment) *corev1.Secret {
 func createBasicTestEnvironment(resources ...runtime.Object) *trait.Environment {
 	fakeClient, err := test.NewFakeClient(resources...)
 	if err != nil {
-		panic(errors.Wrap(err, "could not create fake client"))
+		panic(fmt.Errorf("could not create fake client: %w", err))
 	}
 
 	var it *camelv1.Integration
diff --git a/e2e/common/cli/default.go b/e2e/common/cli/default.go
index 7d19ea637..dbd4ae0b2 100644
--- a/e2e/common/cli/default.go
+++ b/e2e/common/cli/default.go
@@ -23,4 +23,4 @@ package cli
 import "github.com/apache/camel-k/v2/e2e/support"
 
 var ns = support.GetEnvOrDefault("CAMEL_K_TEST_NAMESPACE", support.GetCIProcessID())
-var operatorID = support.GetEnvOrDefault("CAMEL_K_OPERATOR_ID",support.GetCIProcessID())
+var operatorID = support.GetEnvOrDefault("CAMEL_K_OPERATOR_ID", support.GetCIProcessID())
diff --git a/e2e/common/config/default.go b/e2e/common/config/default.go
index 96fbb9055..4a5ced9e0 100644
--- a/e2e/common/config/default.go
+++ b/e2e/common/config/default.go
@@ -23,4 +23,4 @@ package config
 import "github.com/apache/camel-k/v2/e2e/support"
 
 var ns = support.GetEnvOrDefault("CAMEL_K_TEST_NAMESPACE", support.GetCIProcessID())
-var operatorID = support.GetEnvOrDefault("CAMEL_K_OPERATOR_ID",support.GetCIProcessID())
+var operatorID = support.GetEnvOrDefault("CAMEL_K_OPERATOR_ID", support.GetCIProcessID())
diff --git a/e2e/common/languages/default.go b/e2e/common/languages/default.go
index 39ad5841c..433ca1e6f 100644
--- a/e2e/common/languages/default.go
+++ b/e2e/common/languages/default.go
@@ -23,4 +23,4 @@ package languages
 import "github.com/apache/camel-k/v2/e2e/support"
 
 var ns = support.GetEnvOrDefault("CAMEL_K_TEST_NAMESPACE", support.GetCIProcessID())
-var operatorID = support.GetEnvOrDefault("CAMEL_K_OPERATOR_ID",support.GetCIProcessID())
+var operatorID = support.GetEnvOrDefault("CAMEL_K_OPERATOR_ID", support.GetCIProcessID())
diff --git a/e2e/common/misc/client_test.go b/e2e/common/misc/client_test.go
index c3363d655..89bacee62 100644
--- a/e2e/common/misc/client_test.go
+++ b/e2e/common/misc/client_test.go
@@ -32,7 +32,7 @@ import (
 	"sigs.k8s.io/controller-runtime/pkg/client/config"
 
 	. "github.com/apache/camel-k/v2/e2e/support"
-	"github.com/apache/camel-k/v2/pkg/apis/camel/v1"
+	v1 "github.com/apache/camel-k/v2/pkg/apis/camel/v1"
 	"github.com/apache/camel-k/v2/pkg/client/camel/clientset/versioned"
 	. "github.com/onsi/gomega"
 )
diff --git a/e2e/common/misc/default.go b/e2e/common/misc/default.go
index 537b2ba70..76b897333 100644
--- a/e2e/common/misc/default.go
+++ b/e2e/common/misc/default.go
@@ -23,4 +23,4 @@ package misc
 import "github.com/apache/camel-k/v2/e2e/support"
 
 var ns = support.GetEnvOrDefault("CAMEL_K_TEST_NAMESPACE", support.GetCIProcessID())
-var operatorID = support.GetEnvOrDefault("CAMEL_K_OPERATOR_ID",support.GetCIProcessID())
+var operatorID = support.GetEnvOrDefault("CAMEL_K_OPERATOR_ID", support.GetCIProcessID())
diff --git a/e2e/common/misc/kamelet_binding_test.go b/e2e/common/misc/kamelet_binding_test.go
index 7c0e10847..3b148174a 100644
--- a/e2e/common/misc/kamelet_binding_test.go
+++ b/e2e/common/misc/kamelet_binding_test.go
@@ -30,7 +30,7 @@ import (
 	corev1 "k8s.io/api/core/v1"
 
 	. "github.com/apache/camel-k/v2/e2e/support"
-	"github.com/apache/camel-k/v2/pkg/apis/camel/v1"
+	v1 "github.com/apache/camel-k/v2/pkg/apis/camel/v1"
 	"github.com/apache/camel-k/v2/pkg/util/kubernetes"
 )
 
diff --git a/e2e/common/misc/kamelet_binding_with_image_test.go b/e2e/common/misc/kamelet_binding_with_image_test.go
index ab2ad549a..86dfdf799 100644
--- a/e2e/common/misc/kamelet_binding_with_image_test.go
+++ b/e2e/common/misc/kamelet_binding_with_image_test.go
@@ -31,7 +31,7 @@ import (
 	corev1 "k8s.io/api/core/v1"
 
 	. "github.com/apache/camel-k/v2/e2e/support"
-	"github.com/apache/camel-k/v2/pkg/apis/camel/v1"
+	v1 "github.com/apache/camel-k/v2/pkg/apis/camel/v1"
 )
 
 func TestPipeWithImage(t *testing.T) {
diff --git a/e2e/common/misc/kamelet_update_test.go b/e2e/common/misc/kamelet_update_test.go
index 055863424..e0f1228c9 100644
--- a/e2e/common/misc/kamelet_update_test.go
+++ b/e2e/common/misc/kamelet_update_test.go
@@ -29,7 +29,7 @@ import (
 	. "github.com/onsi/gomega"
 
 	. "github.com/apache/camel-k/v2/e2e/support"
-	"github.com/apache/camel-k/v2/pkg/apis/camel/v1"
+	v1 "github.com/apache/camel-k/v2/pkg/apis/camel/v1"
 )
 
 const customLabel = "custom-label"
diff --git a/e2e/common/traits/default.go b/e2e/common/traits/default.go
index d08b902f7..59a520c86 100644
--- a/e2e/common/traits/default.go
+++ b/e2e/common/traits/default.go
@@ -23,4 +23,4 @@ package traits
 import "github.com/apache/camel-k/v2/e2e/support"
 
 var ns = support.GetEnvOrDefault("CAMEL_K_TEST_NAMESPACE", support.GetCIProcessID())
-var operatorID = support.GetEnvOrDefault("CAMEL_K_OPERATOR_ID",support.GetCIProcessID())
+var operatorID = support.GetEnvOrDefault("CAMEL_K_OPERATOR_ID", support.GetCIProcessID())
diff --git a/e2e/common/traits/deployment_test.go b/e2e/common/traits/deployment_test.go
index 7aa82ade1..7b9f2e5b4 100644
--- a/e2e/common/traits/deployment_test.go
+++ b/e2e/common/traits/deployment_test.go
@@ -23,9 +23,10 @@ limitations under the License.
 package traits
 
 import (
-	appsv1 "k8s.io/api/apps/v1"
 	"testing"
 
+	appsv1 "k8s.io/api/apps/v1"
+
 	. "github.com/onsi/gomega"
 	. "github.com/onsi/gomega/gstruct"
 
diff --git a/e2e/common/traits/errored_trait_test.go b/e2e/common/traits/errored_trait_test.go
index b74d0bccb..391a76ab5 100644
--- a/e2e/common/traits/errored_trait_test.go
+++ b/e2e/common/traits/errored_trait_test.go
@@ -30,7 +30,7 @@ import (
 	corev1 "k8s.io/api/core/v1"
 
 	. "github.com/apache/camel-k/v2/e2e/support"
-	"github.com/apache/camel-k/v2/pkg/apis/camel/v1"
+	v1 "github.com/apache/camel-k/v2/pkg/apis/camel/v1"
 )
 
 func TestErroredTrait(t *testing.T) {
diff --git a/e2e/common/traits/health_test.go b/e2e/common/traits/health_test.go
index 535dd8a72..fc15af7d1 100644
--- a/e2e/common/traits/health_test.go
+++ b/e2e/common/traits/health_test.go
@@ -25,11 +25,12 @@ package traits
 import (
 	"encoding/json"
 	"fmt"
-	camelv1 "github.com/apache/camel-k/v2/pkg/apis/camel/v1"
 	"strings"
 	"testing"
 	"time"
 
+	camelv1 "github.com/apache/camel-k/v2/pkg/apis/camel/v1"
+
 	. "github.com/onsi/gomega"
 
 	corev1 "k8s.io/api/core/v1"
diff --git a/e2e/common/traits/pdb_test.go b/e2e/common/traits/pdb_test.go
index 58d6788fa..6fcb5f83a 100644
--- a/e2e/common/traits/pdb_test.go
+++ b/e2e/common/traits/pdb_test.go
@@ -31,7 +31,7 @@ import (
 
 	corev1 "k8s.io/api/core/v1"
 	policyv1 "k8s.io/api/policy/v1"
-	"k8s.io/apimachinery/pkg/api/errors"
+	k8serrors "k8s.io/apimachinery/pkg/api/errors"
 	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
 	"k8s.io/apimachinery/pkg/util/intstr"
 
@@ -102,7 +102,7 @@ func TestPodDisruptionBudgetTrait(t *testing.T) {
 			Name: pods[0].Name,
 		},
 	})
-	Expect(err).To(MatchError(&errors.StatusError{
+	Expect(err).To(MatchError(&k8serrors.StatusError{
 		ErrStatus: metav1.Status{
 			Status:  "Failure",
 			Message: "Cannot evict pod as it would violate the pod's disruption budget.",
@@ -152,7 +152,7 @@ func podDisruptionBudget(ns string, name string) func() *policyv1.PodDisruptionB
 			},
 		}
 		err := TestClient().Get(TestContext, ctrl.ObjectKeyFromObject(&pdb), &pdb)
-		if err != nil && errors.IsNotFound(err) {
+		if err != nil && k8serrors.IsNotFound(err) {
 			return nil
 		} else if err != nil {
 			panic(err)
diff --git a/e2e/common/traits/prometheus_test.go b/e2e/common/traits/prometheus_test.go
index d01e61629..2a4d42629 100644
--- a/e2e/common/traits/prometheus_test.go
+++ b/e2e/common/traits/prometheus_test.go
@@ -30,7 +30,7 @@ import (
 	"github.com/stretchr/testify/assert"
 
 	corev1 "k8s.io/api/core/v1"
-	"k8s.io/apimachinery/pkg/api/errors"
+	k8serrors "k8s.io/apimachinery/pkg/api/errors"
 
 	ctrl "sigs.k8s.io/controller-runtime/pkg/client"
 
@@ -83,7 +83,7 @@ func podMonitor(ns string, name string) func() *monitoringv1.PodMonitor {
 			Name:      name,
 		}
 		err := TestClient().Get(TestContext, key, &pm)
-		if err != nil && errors.IsNotFound(err) {
+		if err != nil && k8serrors.IsNotFound(err) {
 			return nil
 		} else if err != nil {
 			panic(err)
diff --git a/e2e/commonwithcustominstall/debug_test.go b/e2e/commonwithcustominstall/debug_test.go
index 6f09316da..ae1a8cd25 100644
--- a/e2e/commonwithcustominstall/debug_test.go
+++ b/e2e/commonwithcustominstall/debug_test.go
@@ -25,12 +25,13 @@ package commonwithcustominstall
 import (
 	"context"
 	"fmt"
-	. "github.com/apache/camel-k/v2/e2e/support"
-	. "github.com/onsi/gomega"
-	v1 "k8s.io/api/core/v1"
 	"net"
 	"testing"
 	"time"
+
+	. "github.com/apache/camel-k/v2/e2e/support"
+	. "github.com/onsi/gomega"
+	v1 "k8s.io/api/core/v1"
 )
 
 func TestKamelCLIDebug(t *testing.T) {
diff --git a/e2e/commonwithcustominstall/platform_traits_test.go b/e2e/commonwithcustominstall/platform_traits_test.go
index c8f6e13a2..2934808bd 100644
--- a/e2e/commonwithcustominstall/platform_traits_test.go
+++ b/e2e/commonwithcustominstall/platform_traits_test.go
@@ -74,4 +74,3 @@ func TestTraitOnIntegrationPlatform(t *testing.T) {
 		})
 	})
 }
-
diff --git a/e2e/knative/default.go b/e2e/knative/default.go
index 62a3ff199..20fe113af 100644
--- a/e2e/knative/default.go
+++ b/e2e/knative/default.go
@@ -23,4 +23,4 @@ package knative
 import "github.com/apache/camel-k/v2/e2e/support"
 
 var ns = support.GetEnvOrDefault("CAMEL_K_TEST_NAMESPACE", support.GetCIProcessID())
-var operatorID = support.GetEnvOrDefault("CAMEL_K_OPERATOR_ID",support.GetCIProcessID())
+var operatorID = support.GetEnvOrDefault("CAMEL_K_OPERATOR_ID", support.GetCIProcessID())
diff --git a/e2e/knative/knative_platform_test.go b/e2e/knative/knative_platform_test.go
index b51e93ec8..2dc5fdedf 100644
--- a/e2e/knative/knative_platform_test.go
+++ b/e2e/knative/knative_platform_test.go
@@ -33,7 +33,7 @@ import (
 	corev1 "k8s.io/api/core/v1"
 
 	. "github.com/apache/camel-k/v2/e2e/support"
-	"github.com/apache/camel-k/v2/pkg/apis/camel/v1"
+	v1 "github.com/apache/camel-k/v2/pkg/apis/camel/v1"
 	"github.com/apache/camel-k/v2/pkg/util/dsl"
 	"github.com/apache/camel-k/v2/pkg/util/knative"
 )
diff --git a/e2e/knative/openapi_test.go b/e2e/knative/openapi_test.go
index b2028f6b1..f9ddb0de8 100644
--- a/e2e/knative/openapi_test.go
+++ b/e2e/knative/openapi_test.go
@@ -23,9 +23,10 @@ limitations under the License.
 package knative
 
 import (
+	"testing"
+
 	. "github.com/apache/camel-k/v2/e2e/support"
 	. "github.com/onsi/gomega"
-	"testing"
 )
 
 func TestOpenAPIService(t *testing.T) {
diff --git a/e2e/native/files/Java2.java b/e2e/native/files/Java2.java
index 73b29ab99..8a3f7ad4a 100644
--- a/e2e/native/files/Java2.java
+++ b/e2e/native/files/Java2.java
@@ -17,7 +17,7 @@
 
  import org.apache.camel.builder.RouteBuilder;
 
- public class Java extends RouteBuilder {
+ public class Java2 extends RouteBuilder {
    @Override
    public void configure() throws Exception {
      from("timer:tick")
diff --git a/e2e/native/native_binding_test.go b/e2e/native/native_binding_test.go
index 1ac2f950f..8e6aca73a 100644
--- a/e2e/native/native_binding_test.go
+++ b/e2e/native/native_binding_test.go
@@ -23,12 +23,13 @@ limitations under the License.
 package native
 
 import (
-	"testing"
-
 	. "github.com/apache/camel-k/v2/e2e/support"
 	v1 "github.com/apache/camel-k/v2/pkg/apis/camel/v1"
 	. "github.com/onsi/gomega"
 	corev1 "k8s.io/api/core/v1"
+	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
+	"testing"
+	"time"
 )
 
 func TestNativeBinding(t *testing.T) {
@@ -41,6 +42,19 @@ func TestNativeBinding(t *testing.T) {
 		).Execute()).To(Succeed())
 		Eventually(PlatformPhase(ns), TestTimeoutMedium).Should(Equal(v1.IntegrationPlatformPhaseReady))
 
+		pl := Platform(ns)()
+		// set a longer timeout than default as for some reason the builder hit the timeout
+		pl.Spec.Build.BuildCatalogToolTimeout = &metav1.Duration{
+			Duration: 5 * time.Minute,
+		}
+		TestClient().Update(TestContext, pl)
+		Eventually(Platform(ns)).ShouldNot(BeNil())
+		Eventually(PlatformBuildCatalogToolTimeout(ns)).Should(Equal(
+			&metav1.Duration{
+				Duration: 5 * time.Minute,
+			},
+		))
+
 		from := corev1.ObjectReference{
 			Kind:       "Kamelet",
 			Name:       "timer-source",
diff --git a/e2e/native/native_with_sources_test.go b/e2e/native/native_with_sources_test.go
index b5128ab95..f5681d479 100644
--- a/e2e/native/native_with_sources_test.go
+++ b/e2e/native/native_with_sources_test.go
@@ -24,13 +24,14 @@ package native
 
 import (
 	"testing"
+	"time"
 
 	. "github.com/onsi/gomega"
 
-	corev1 "k8s.io/api/core/v1"
-
 	. "github.com/apache/camel-k/v2/e2e/support"
 	v1 "github.com/apache/camel-k/v2/pkg/apis/camel/v1"
+	corev1 "k8s.io/api/core/v1"
+	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
 )
 
 func TestNativeHighMemoryIntegrations(t *testing.T) {
@@ -43,6 +44,19 @@ func TestNativeHighMemoryIntegrations(t *testing.T) {
 		).Execute()).To(Succeed())
 		Eventually(PlatformPhase(ns), TestTimeoutMedium).Should(Equal(v1.IntegrationPlatformPhaseReady))
 
+		pl := Platform(ns)()
+		// set a longer timeout than default as for some reason the builder hit the timeout
+		pl.Spec.Build.BuildCatalogToolTimeout = &metav1.Duration{
+			Duration: 5 * time.Minute,
+		}
+		TestClient().Update(TestContext, pl)
+		Eventually(Platform(ns)).ShouldNot(BeNil())
+		Eventually(PlatformBuildCatalogToolTimeout(ns)).Should(Equal(
+			&metav1.Duration{
+				Duration: 5 * time.Minute,
+			},
+		))
+
 		t.Run("java native support", func(t *testing.T) {
 			name := "java-native"
 			Expect(KamelRunWithID(operatorID, ns, "files/Java.java", "--name", name,
diff --git a/e2e/support/csv.go b/e2e/support/csv.go
index 24ffe27b5..194fb140a 100644
--- a/e2e/support/csv.go
+++ b/e2e/support/csv.go
@@ -29,7 +29,7 @@ import (
 	"unsafe"
 
 	corev1 "k8s.io/api/core/v1"
-	"k8s.io/apimachinery/pkg/api/errors"
+	k8serrors "k8s.io/apimachinery/pkg/api/errors"
 	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
 
 	ctrl "sigs.k8s.io/controller-runtime/pkg/client"
@@ -97,7 +97,7 @@ func CatalogSource(ns, name string) func() *olm.CatalogSource {
 				Name:      name,
 			},
 		}
-		if err := TestClient().Get(TestContext, ctrl.ObjectKeyFromObject(cs), cs); err != nil && errors.IsNotFound(err) {
+		if err := TestClient().Get(TestContext, ctrl.ObjectKeyFromObject(cs), cs); err != nil && k8serrors.IsNotFound(err) {
 			return nil
 		} else if err != nil {
 			log.Errorf(err, "Error while retrieving CatalogSource %s", name)
@@ -119,7 +119,7 @@ func CatalogSourcePhase(ns, name string) func() string {
 func CatalogSourcePod(ns, csName string) func() *corev1.Pod {
 	return func() *corev1.Pod {
 		podList, err := TestClient().CoreV1().Pods(ns).List(TestContext, metav1.ListOptions{})
-		if err != nil && errors.IsNotFound(err) {
+		if err != nil && k8serrors.IsNotFound(err) {
 			return nil
 		} else if err != nil {
 			panic(err)
diff --git a/e2e/support/test_support.go b/e2e/support/test_support.go
index 021f41aca..4377c64b8 100644
--- a/e2e/support/test_support.go
+++ b/e2e/support/test_support.go
@@ -27,6 +27,7 @@ import (
 	"bytes"
 	"context"
 	"encoding/json"
+	"errors"
 	"fmt"
 	"io"
 	"os"
@@ -44,7 +45,7 @@ import (
 	"github.com/google/uuid"
 	"github.com/onsi/gomega"
 	"github.com/onsi/gomega/format"
-	"github.com/pkg/errors"
+
 	"github.com/spf13/cobra"
 	appsv1 "k8s.io/api/apps/v1"
 	batchv1 "k8s.io/api/batch/v1"
@@ -348,7 +349,7 @@ func verifyGlobalOperator() error {
 
 	oppod := OperatorPod(opns)()
 	if oppod == nil {
-		return fmt.Errorf("No operator pod detected in namespace %s. Operator install is a pre-requisite of the test", opns)
+		return fmt.Errorf("no operator pod detected in namespace %s. Operator install is a pre-requisite of the test", opns)
 	}
 
 	return nil
diff --git a/e2e/support/test_util.go b/e2e/support/test_util.go
index 4d22c983c..b85e93060 100644
--- a/e2e/support/test_util.go
+++ b/e2e/support/test_util.go
@@ -23,10 +23,11 @@ limitations under the License.
 package support
 
 import (
+	"os"
+
 	. "github.com/onsi/gomega"
 	. "github.com/onsi/gomega/gstruct"
 	"github.com/onsi/gomega/types"
-	"os"
 )
 
 func init() {
diff --git a/pkg/cmd/run_test.go b/pkg/cmd/run_test.go
index f31330f7f..219b2f7a2 100644
--- a/pkg/cmd/run_test.go
+++ b/pkg/cmd/run_test.go
@@ -524,7 +524,7 @@ func TestRunValidateArgs(t *testing.T) {
 	args = []string{"missing_file"}
 	err = runCmdOptions.validateArgs(rootCmd, args)
 	assert.NotNil(t, err)
-	assert.Equal(t, "One of the provided sources is not reachable: missing file or unsupported scheme in missing_file", err.Error())
+	assert.Equal(t, "one of the provided sources is not reachable: missing file or unsupported scheme in missing_file", err.Error())
 }
 
 func TestResolvePodTemplate(t *testing.T) {