Skip to content

EKS kubernetes.config.config_exception.ConfigException: Service host/port is not set.  #2002

@ashish-aesthisia

Description

@ashish-aesthisia

What happened (please include outputs or screenshots):
Error while trying to access the kubernetes functions from within the cluster.

main.py
Screenshot 2023-01-30 at 9 16 13 PM

requirement.txt
Screenshot 2023-01-30 at 9 14 54 PM

Error
Screenshot 2023-01-30 at 9 14 13 PM

What you expected to happen:
List all the pods

How to reproduce it (as minimally and precisely as possible):
Python: 3.10-alpine(Dockerimage)
Kubernetes: 1.24
Hosted on: EKS

Tried all the available documentation. I do have KUBERNETES_SERVICE_HOST & KUBERNETES_PORT in env as well inside pod.yaml.

Any help would be appreciated.
Thanks

Metadata

Metadata

Assignees

Labels

kind/bugCategorizes issue or PR as related to a bug.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions