Kubeconfig file is getting malformed when workspace starts with persistent $HOME directory

Solution Verified - Updated -

Issue

  • Kubeconfig file is getting malformed when workspace startswith persistent $HOME directory.
  • Users getting below error when running commands using oc cli on workspace terminal :

    $ oc get pods
    error: error loading config file "/home/user/.kube/config": yaml: mapping values are not allowed in this context
    

Environment

  • Red Hat OpenShift Container Platform (RHOCP)
    • v4.12+
  • Red Hat OpenShift Dev Spaces
    • v3.16

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content