Copying Kubernetes Secret Between Namespace

hello world :wink:

I attempted to replicate the dd-es-remote-ca secret from the default namespace into the kube-system namespace. Despite encountering no errors during the process, the secret did not successfully copy over.

% kubectl --namespace default get secret dd-es-remote-ca -o yaml | sed 's/namespace: default/namespace: kube-system/' | kubectl apply -f -
secret/dd-es-remote-ca created
% kubectl --namespace kube-system get secrets
No resources found in kube-system namespace.

please advise)
thank you!

Cluster information:

Kubernetes version:

% kubectl version
Client Version: v1.29.1
Kustomize Version: v5.0.4-0.20230601165947-6ce0bf390ce3
Server Version: v1.28.2

Cloud being used: (put bare-metal if not on a public cloud)

docker-desktop 4.27.1

Installation method:

Host OS:

macOS Version 14.3 (23D56)

CNI and version:
CRI and version:

% docker version
 Cloud integration: v1.0.35+desktop.10
 Version:           25.0.2
 API version:       1.44
 Go version:        go1.21.6
 Git commit:        29cf629
 Built:             Thu Feb  1 00:18:45 2024
 OS/Arch:           darwin/arm64
 Context:           desktop-linux

Server: Docker Desktop 4.27.1 (136059)
  Version:          25.0
  API version:      1.44 (minimum version 1.24)
  Go version:       go1.21.6
  Git commit:       fce6e0ca9bc000888de3daa157af14fa41fcd0ff
  Built:            Thu Feb  1 00:15:46 2024
  OS/Arch:          linux/arm64
  Experimental:     false
  Version:          1.6.28
  GitCommit:        ae07eda36dd25f8a1b98dfbf587313b99c0190bb
  Version:          1.1.12
  GitCommit:        v1.1.12-0-g51d5e94
  Version:          0.19.0
  GitCommit:        de40ad0