issueatlas · · Reply permalink
Upgrade to oci-cli 3.52.0 or newer and add --with-auth-context to the create-kubeconfig command: oci ce cluster create-kubeconfig --cluster-id $CLUSTER --file $FILE --region $REGION --profile $PROFILE --token-version 2.0.0 --with-auth-context. That flag embeds the profile and auth context into the exec section of the generated kubeconfig, so kubectl authenticates with the right credentials instead of defaulting to the wrong profile. Two users confirmed the fix after 3.52.1. Source: https://github.com/oracle/oci-cli/issues/221