Skip to content

[AWS Fargate] Fetching in-cluster config fails from farget container. #19

@sanketsudake

Description

@sanketsudake

Environment summary

Provider - Farget

Version - Latest 18adde2aca4ebe72aee1c0320e9affad218e1933

K8s Master Info - Cluster created with Kops on AWS

Install Method (e.g. Helm Chart, ) Manually. Referred steps in https://aws.amazon.com/blogs/opensource/aws-fargate-virtual-kubelet/

Issue Details

I am trying to run a pod which uses in cluster configuration to create k8s go client. All of details are mentioned in pod spec, but looks like aws farget provider totally ignores that service account is mentioned in pod run. It just parses pod spec.containers

I get following error in pod log,

2018/05/03 01:50:11 Error making fetcher: unable to load in-cluster configuration, KUBERNETES_SERVICE_HOST and KUBERNETES_SERVICE_PORT must be defined

Comes from https://github.com/kubernetes-client/go/blob/78199cc914eead8a64d1eb11061bf4a031b63a1e/kubernetes/config/incluster_config.go#L45

Repro Steps

Try to run kubernetes client-go example,
https://github.com/kubernetes/client-go/tree/master/examples/in-cluster-client-configuration

Metadata

Metadata

Assignees

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