Skip to content

"error":"no configuration has been provided, try setting KUBERNETES_MASTER environment variable" #46

@kpbasu

Description

@kpbasu

I am getting below error during docker run the operator image. What could be the issue?

 podman run -it localhost/controller:latest
{"level":"info","ts":1687455343.9304368,"logger":"cmd","msg":"Version","Go Version":"go1.15.5","GOOS":"linux","GOARCH":"amd64","ansible-operator":"v1.3.0","commit":"1abf57985b43bf6a59dcd18147b3c574fa57d3f6"}
{"level":"error","ts":1687455343.9306693,"logger":"cmd","msg":"Failed to get config.","error":"invalid configuration: no configuration has been provided, try setting KUBERNETES_MASTER environment variable","errorCauses":[{"error":"no configuration has been provided, try setting KUBERNETES_MASTER environment variable"}],"stacktrace":"github.com/go-logr/zapr.(*zapLogger).Error\n\t/home/travis/gopath/pkg/mod/github.com/go-logr/zapr@v0.2.0/zapr.go:132\ngithub.com/operator-framework/operator-sdk/internal/cmd/ansible-operator/run.run\n\toperator-sdk/internal/cmd/ansible-operator/run/cmd.go:89\ngithub.com/operator-framework/operator-sdk/internal/cmd/ansible-operator/run.NewCmd.func1\n\toperator-sdk/internal/cmd/ansible-operator/run/cmd.go:74\ngithub.com/spf13/cobra.(*Command).execute\n\t/home/travis/gopath/pkg/mod/github.com/spf13/cobra@v1.0.0/command.go:846\ngithub.com/spf13/cobra.(*Command).ExecuteC\n\t/home/travis/gopath/pkg/mod/github.com/spf13/cobra@v1.0.0/command.go:950\ngithub.com/spf13/cobra.(*Command).Execute\n\t/home/travis/gopath/pkg/mod/github.com/spf13/cobra@v1.0.0/command.go:887\nmain.main\n\toperator-sdk/cmd/ansible-operator/main.go:40\nruntime.main\n\t/home/travis/.gimme/versions/go1.15.5.linux.amd64/src/runtime/proc.go:204"}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions