Skip to content

bug: kflex init -c fails #613

Description

@MikeSpreitzer

Describe the bug

mspreitz@mjs13 kubeflex % kflex version
WARNING: current kflex version introduces BREAKING CHANGES related to kflex and your kubeconfig file which may interrupt kflex to function properly.
See https://github.com/kubestellar/kubeflex/blob/main/docs/users.md
Kubeflex version: v0.9.1.a6b8746 2025-09-08T01:47:31Z
Could not connect to a Kubernetes cluster: error building kubeconfig: invalid configuration: no configuration has been provided, try setting KUBERNETES_MASTER environment variable

mspreitz@mjs13 kubeflex % kflex init --create-kind      
WARNING: current kflex version introduces BREAKING CHANGES related to kflex and your kubeconfig file which may interrupt kflex to function properly.
See https://github.com/kubestellar/kubeflex/blob/main/docs/users.md
✔ Checking if OpenShift cluster...
◐ Checking if a kubeflex kind instance already exists...✔ Checking if kind is installed...
✔ Checking if a kubeflex kind instance already exists...
✔ Creating kind cluster...
Creating cluster "kubeflex" ...
 ✓ Ensuring node image (kindest/node:v1.32.2) 🖼
 ✓ Preparing nodes 📦  
 ✓ Writing configuration 📜 
 ✓ Starting control-plane 🕹️ 
 ✓ Installing CNI 🔌 
 ✓ Installing StorageClass 💾 
Set kubectl context to "kind-kubeflex"
You can now use your cluster with:

kubectl cluster-info --context kind-kubeflex

Thanks for using kind! 😊
◑ Installing and patching nginx ingress...namespace/ingress-nginx created
serviceaccount/ingress-nginx created
serviceaccount/ingress-nginx-admission created
role.rbac.authorization.k8s.io/ingress-nginx created
role.rbac.authorization.k8s.io/ingress-nginx-admission created
clusterrole.rbac.authorization.k8s.io/ingress-nginx created
clusterrole.rbac.authorization.k8s.io/ingress-nginx-admission created
rolebinding.rbac.authorization.k8s.io/ingress-nginx created
rolebinding.rbac.authorization.k8s.io/ingress-nginx-admission created
clusterrolebinding.rbac.authorization.k8s.io/ingress-nginx created
clusterrolebinding.rbac.authorization.k8s.io/ingress-nginx-admission created
configmap/ingress-nginx-controller created
service/ingress-nginx-controller created
◒ Installing and patching nginx ingress...service/ingress-nginx-controller-admission created
deployment.apps/ingress-nginx-controller created
job.batch/ingress-nginx-admission-create created
job.batch/ingress-nginx-admission-patch created
ingressclass.networking.k8s.io/nginx created
validatingwebhookconfiguration.admissionregistration.k8s.io/ingress-nginx-admission created
◐ Installing and patching nginx ingress...deployment.apps/ingress-nginx-controller patched
✔ Installing and patching nginx ingress...
✔ Kubeflex v0.9.1.a6b8746 2025-09-08T01:47:31Z
✔ Setting hosting cluster preference in kubeconfig
✔ Ensuring kubeflex-system namespace...
✔ Installing shared backend DB...
✔ Waiting for shared backend DB to become ready...
◐ Installing kubeflex operator...Error: error installing chart: error downloading the OCI chart oci://ghcr.io/kubestellar/kubeflex/chart/kubeflex-operator:9 : ghcr.io/kubestellar/kubeflex/chart/kubeflex-operator:9: not found
Usage:
  kflex init [flags]

Flags:
  -c, --create-kind                  Create and configure a kind cluster for installing Kubeflex
  -d, --domain string                domain for FQDN (default "localtest.me")
  -p, --external-port int            external port used by ingress (default 9443)
  -h, --help                         help for init
  -n, --host-container-name string   Name of the hosting cluster container (kind or k3d only) (default "kubeflex-control-plane")

Global Flags:
  -s, --chatty-status       chatty status indicator (default true)
  -k, --kubeconfig string   path to the kubeconfig file for the KubeFlex hosting cluster. If not specified, and $KUBECONFIG is set, it uses the value in $KUBECONFIG, otherwise it falls back to ${HOME}/.kube/config (default "/Users/mspreitz/.kube/config")
  -v, --verbosity int       log level


mspreitz@mjs13 kubeflex % kind get clusters
kubeflex

mspreitz@mjs13 kubeflex % kubectl config current-context
kind-kubeflex

mspreitz@mjs13 kubeflex % helm list -A
NAME    	NAMESPACE      	REVISION	UPDATED                             	STATUS  	CHART            	APP VERSION
postgres	kubeflex-system	1       	2026-01-09 16:25:04.634905 -0500 EST	deployed	postgresql-13.1.5	16.0.0     

mspreitz@mjs13 kubeflex % date
Fri Jan  9 16:27:08 EST 2026

Steps To Reproduce

Shown above

Expected Behavior

kflex init -c creates a kind cluster and initializes it as the kubeflex hosting cluster.

Additional Context

  • Run on MacOS 15.7.3
  • bash "version 5.3.9(1)-release (aarch64-apple-darwin24.6.0)"
  • go version go1.25.5 darwin/arm64

Metadata

Metadata

Labels

area/cliIssues or PRs related to CLI changeskind/bugCategorizes issue or PR as related to a bug.

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions