cannot generate a service account token in kubernetes v1

I am trying to generate a service account token on a kubernetes cluster for API authentication. The operation succeeds and the secret is created but there is no token generated. What could I be missing here?

    "kind": "Secret",
    "apiVersion": "v1",
    "metadata": {
        "name": "defaultsecret1",
        "annotations": {
            "": "cfme"
    "type": ""

[root@atomic001 ~]# kubectl create -f secret.json 
secret "defaultsecret1" created

[root@atomic001 ~]# kubectl get secret defaultsecret1
NAME             TYPE                                  **DATA**          AGE
defaultsecret1   **0**         13s

[root@atomic001 ~]# kubectl describe secret defaultsecret1
Name:       defaultsecret1
Namespace:  default
Labels:     <none>


                    <--- token should be here

[root@atomic001 ~]# 

Been up and down and all around on this. Any help is appreciated.

  • How to run Tensorboard and jupyter concurrently with docker?
  • Library installation in docker
  • Kubernetes networking issue
  • Crontab doesn't have credentials
  • apt-get unable to locate package using custom sources.list in docker+dokku
  • How to let the docker container know itself is running with a host network?
  • Unable to pull docker image with concourse - Verifying Checksum error
  • Nginx can't talk to PHP-fpm in Docker
  • docker-compose not adding hostname to /etc/hosts
  • Using docker image on local file
  • How to deploy a rails app to google container engine with kubernetes?
  • Shared Memory with Docker containers (docker version 1.4.1)
  • One Solution collect form web for “cannot generate a service account token in kubernetes v1”

    I figured this out.

    I had to generate a private key with openssl and then point to it in the controller-manager configuration file. Now the tokens are being created.


    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.