Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remote Object creation not working for Kubernetes-provider #297

Open
dbacademy opened this issue Oct 2, 2024 · 0 comments
Open

Remote Object creation not working for Kubernetes-provider #297

dbacademy opened this issue Oct 2, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@dbacademy
Copy link

What happened?

Following error message I am getting when trying to create object into remote openshift cluster, its working perfectly with in-cluster provider config but not with remote cluster.

message: 'connect failed: cannot build kube client for provider config: cannot
get REST config for provider: cannot create new REST config using provider secret:
currentContext not set in kubeconfig'

How can we reproduce it?

This is the defination of simple object to create Namespace to remoe cluster.

kind: Object
metadata:
name: sample-namespace
spec:
forProvider:
manifest:
apiVersion: v1
kind: Namespace
metadata:

name in manifest is optional and defaults to Object name

name: some-other-name

labels:
provisioned-by: "crossplane"
providerConfigRef:
name: providerconfig-shared-nonprod

Defination of Providerconfig

apiVersion: kubernetes.crossplane.io/v1alpha1
kind: ProviderConfig
metadata:
name: providerconfig-shared-nonprod
spec:
credentials:
source: Secret
secretRef:
namespace: crossplane-system
name: shared-nonprod-kubeconfig
key: kubeconfig

I created a secret into conplane-system namespace where crossplae and provider is installed.

apiVersion: v1
data:
value.yaml:
kind: Secret
metadata:
name: shared-nonprod-kubeconfig
namespace: crossplane-system
type: Opaque

Anythig I am missing ? need help please.
Or do we have any hints how to use providerconfig with secret ref. as kubeconfig

What environment did it happen in?

Crossplane version:

Client Version: v1.17.1
Server Version: v1.17.0

Client Version: 4.14.31
Kustomize Version: v5.0.1
Server Version: 4.13.49
Kubernetes Version: v1.26.15+e0953cc

@dbacademy dbacademy added the bug Something isn't working label Oct 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant