Skip to content

service account token missing in pod #246

@bcle

Description

@bcle

Pods using in-cluster authentication are failing because /run/secrets/kubernetes.io/serviceaccount/token is missing from their file system. I am using this KIP provider version:

    Image:         elotl/kip:latest
    Image ID:      docker-pullable://elotl/kip@sha256:8182c30c9751290ce319eaa27f82109bd907c5f265095c37d0520b82bd7fa510

on a AWS cluster recently created using KIP's terraform script.

One way to reproduce this problem is to start a simple ubuntu pod that runs an infinite loop:

kubectl run xenial --image=ubuntu:xenial --command -- bash -c 'while true; do echo `date`; sleep 5; done'

Then, this command shows the contents of /run/secrets/kubernetes.io/serviceaccount/:

kubectl exec xenial -- bash -c "ls -l /run/secrets/kubernetes.io/serviceaccount/"

The output shows that the token file is missing:

total 4
-rw-r--r-- 1 root root 1066 Sep 14 04:00 ca.crt

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