Skip to content

Environment variables are cached and not reloaded when opening a different pod of the same service #723

Open
@lucasolopes

Description

@lucasolopes

Describe the bug

When using Freelens to connect to a pod, environment variables are loaded correctly the first time. However, if you later connect to another pod of the same service (e.g., switching between replicas or environments where the pod has different env vars), Freelens does not reload the environment variables. Instead, it uses the previously cached values.

This leads to inconsistencies and makes it difficult to troubleshoot pods that are expected to have different configurations.

Reproduction steps

Connect to Pod A of a service using Freelens.

Verify the environment variables are loaded (e.g., via env or printenv).

Now switch to Pod B of the same service (which has different or updated env vars).

Check the environment variables again — the output still reflects those from Pod A.

Expected behavior

Freelens should reload environment variables from the currently connected pod and not cache values between sessions or pods.

Screenshots

No response

Freelens version

1.2.0

Operating system type and version

linux ubunto 24.04

Installation method

deb

Logs

No response

Kubeconfig

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions