Back to blog

Sync kubeconfigs between your laptop and desktop, end-to-end encrypted

December 1, 2026 8 min read Kubexer Team
KubeconfigSyncEncryptionSecurity

A kubeconfig is a credential. It usually holds a client certificate and key, a bearer token, or the configuration for a command that fetches one. Yet when people get a second machine, the way kubeconfigs move is often scp, a USB stick, a notes app, or pasting the file into a chat with themselves. Each copy is another place a cluster credential can leak from.

Kubexer's kubeconfig sync, a Pro feature, moves them through your Kubexer account instead, encrypted on your device with a password the server never sees. This post describes how it works, including the parts that are manual by design.

Step 0: Kubexer's local kubeconfig list

Sync builds on the local list, which is free. Open Settings → Kube Configs. You can:

  • Add Files or Add Folder to reference kubeconfig files on disk. Kubexer reads them in place and never modifies them.
  • Scan ~/.kube to pick up everything there.
  • Paste YAML directly. Pasted configs are stored by Kubexer and encrypted at rest with your operating system's secure storage; the row shows an Encrypted badge. If secure storage is unavailable, it shows Not encrypted instead, so you know.

Removing a row only unlinks it from Kubexer. Your files stay where they are.

Step 1: set up the encryption vault

Synced kubeconfigs are protected by a vault with its own password, separate from your Kubexer account password. Open Settings → Vault and choose Set up encryption:

  1. Choose a password of at least 8 characters. A strength meter helps; longer is better.
  2. Optionally tick Remember on this device, which keeps the vault unlocked across restarts using your OS secure storage.
  3. Save the recovery key. It is shown once. Copy it somewhere safe and confirm you have.

If you forget the password and lose the recovery key, your synced kubeconfigs are gone for good. Nobody, including Kubexer, can recover them. That is the point.

What happens under the hood

  • A random 256-bit data key encrypts every synced kubeconfig, both the YAML and its label, with AES-256-GCM.
  • Your password is stretched with scrypt (N=217, r=8, p=1, about 128 MiB of memory per guess) into a key that wraps the data key. The recovery key wraps a second copy.
  • The server stores the ciphertext and the wrapped keys. It never sees the password, the data key or any kubeconfig in the clear. There is no password hash; a wrong password is detected because decryption fails.
  • Each record carries a fingerprint, an HMAC keyed by the data key, so the app can spot changes without the server learning anything.

The app states the limit honestly: this protects against a leaked database or a curious administrator, not against a compromised computer. While Kubexer runs, it necessarily sees your kubeconfigs in plaintext, as any Kubernetes client must.

Step 2: upload

Back in Kube Configs, each row has a cloud button. "Not in your cloud — click to upload" sends that kubeconfig, encrypted. Sync is per file and deliberate: you choose which kubeconfigs leave the machine. A config for a throwaway local cluster can stay local, and demo clusters such as minikube are never uploadable.

If a config with the same name is already in your cloud, you are asked whether to Replace cloud copy (which updates it for all your devices) or Keep both. Because labels are encrypted, the server cannot check for duplicates; the app does it after decrypting.

Step 3: download on the other machine

  1. Sign in to Kubexer with the same account.
  2. Open Settings → Vault and Unlock with your vault password (or recovery key).
  3. In Kube Configs, cloud-only entries are listed dimmed: "In your cloud — download to use it on this device." Click Download to this device.

Until you unlock, the app can see that cloud entries exist but cannot even read their names.

When a local copy differs from the cloud copy, for example after a token was rotated on one machine, the row offers Upload changes. Sync does not happen silently in the background. Upload and download are explicit clicks, so a broken config on one machine is never pushed over a working one without you choosing to.

Devices

A Kubexer account can be signed in on three desktop devices per product, and separately on three mobile devices, with one active session per device. Any signed-in device with Pro and the vault password can upload and download.

Locking, rotating, resetting

  • Lock now pauses cloud access. Kubeconfigs already on this device keep working.
  • Change password re-wraps the data key; nothing needs re-uploading.
  • Forget this device removes the remembered key from this machine.
  • Reset encryption wipes the server copy and the vault state, for when you want to start over.

What sync does not do

  • It is not automatic. Each kubeconfig is uploaded and downloaded with a click.
  • It does not import clusters from cloud providers. Kubeconfigs come from files, folders, ~/.kube or pasted YAML. If your kubeconfig uses an exec plugin such as a cloud CLI, that CLI still has to be installed on each machine.
  • It syncs kubeconfigs, not app settings or scan results. Alert rules sync separately.
  • Machines using an offline license do not sync.
  • Without Pro, local kubeconfig management stays free; the cloud buttons show a Pro notice, and the server refuses uploads.

Sharing with someone else

Sync is for your devices. To give a teammate or a CI job access to a cluster, do not share your kubeconfig at all. Generate a least-privilege one with a scoped kubeconfig instead.

Try it

Kubeconfig sync is part of Pro in Kubexer. Set up the vault, store the recovery key, upload one config, and download it on your second machine.