Skip to content
This repository was archived by the owner on Nov 9, 2022. It is now read-only.
This repository is currently being migrated. It's locked while the migration is in progress.
This repository was archived by the owner on Nov 9, 2022. It is now read-only.

failed to dial all known cluster members, (http://storageos.kube-system.svc.cluster.local) #134

@robinbraemer

Description

@robinbraemer

I'm trying to connect a in-cluster client to the StorageOS API but cluster members cannot be found.

This is my go code

func InitClient() error {
	cli, err := storageos.NewClient(env.Get(env.STORAGEOS_HOST))
	if err != nil {
		return err
	}
	cli.SetAuth(env.Get(env.STORAGEOS_USERNAME), env.Get(env.STORAGEOS_PASSWORD))
	client = cli
	return nil
}

and then I run a test ping

if err = client.Ping(); err != nil {
	log.Error(err, "Failed ping test StorageOS API")
	os.Exit(1)
}

and there is the error

"error":"failed to dial all known cluster members, (http://storageos.kube-system.svc.cluster.local)

The pod is running in another namespace.

This is the storageos service:

apiVersion: v1
kind: Service
metadata:
  labels:
    app: storageos
  name: storageos
  namespace: kube-system
spec:
  clusterIP: 10.43.68.167
  ports:
  - name: storageos
    port: 5705
    protocol: TCP
    targetPort: 5705
  selector:
    app: storageos
    kind: daemonset
  sessionAffinity: None
  type: ClusterIP
status:
  loadBalancer: {}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    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