{"action":"closed","issue":{"url":"https://api.github.com/repos/kubernetes/kubernetes/issues/24171","repository_url":"https://api.github.com/repos/kubernetes/kubernetes","labels_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/24171/labels{/name}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/24171/comments","events_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/24171/events","html_url":"https://github.com/kubernetes/kubernetes/issues/24171","id":147906275,"number":24171,"title":"No service account secrets in default azure deployment","user":{"login":"carsonoid","id":2973513,"avatar_url":"https://avatars.githubusercontent.com/u/2973513?v=3","gravatar_id":"","url":"https://api.github.com/users/carsonoid","html_url":"https://github.com/carsonoid","followers_url":"https://api.github.com/users/carsonoid/followers","following_url":"https://api.github.com/users/carsonoid/following{/other_user}","gists_url":"https://api.github.com/users/carsonoid/gists{/gist_id}","starred_url":"https://api.github.com/users/carsonoid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/carsonoid/subscriptions","organizations_url":"https://api.github.com/users/carsonoid/orgs","repos_url":"https://api.github.com/users/carsonoid/repos","events_url":"https://api.github.com/users/carsonoid/events{/privacy}","received_events_url":"https://api.github.com/users/carsonoid/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-04-12T23:50:11Z","updated_at":"2016-04-13T19:00:55Z","closed_at":"2016-04-13T19:00:55Z","body":"So I followed the azure get started guide and it all went as planned until I wanted to deploy a ingress controller. The pod got created but it was unable to start.\r\n\r\nAs I delved into it I found out that the cluster didn't have any secrets in it's default service account. I fixed that by adding `--service-account-private-key-file=/var/run/kubernetes/apiserver.key` to the kube-controller-manager startup so it could generate tokens and now there are secrets as expected.\r\n\r\nHowever, even with secrets my pod is not getting the appropriate service account token mounted through.  I tried adding `serviceaccount: default` manually to the yaml and re-deploying. The yaml showed correctly but the mounted directory was still missing.\r\n\r\nDump of all my systemd unit files below:\r\n```\r\n==> /etc/systemd/system/kube-apiserver.service <==\r\n[Unit]\r\nAfter=install-kubernetes.service\r\nBefore=kube-controller-manager.service\r\nBefore=kube-scheduler.service\r\nConditionFileIsExecutable=/opt/kubernetes/server/bin/kube-apiserver\r\nDescription=Kubernetes API Server\r\nDocumentation=http://kubernetes.io/\r\nWants=install-kubernetes.service\r\nConditionHost=kube-00\r\n[Service]\r\nExecStart=/opt/kubernetes/server/bin/kube-apiserver \\\r\n    --insecure-bind-address=0.0.0.0 \\\r\n    --advertise-address=13.92.86.221 \\\r\n    --port=8080 \\\r\n    $ETCD_SERVERS \\\r\n    --basic-auth-file=/opt/kubernetes/auth.csv \\\r\n    --service-cluster-ip-range=10.16.0.0/12 \\\r\n    --cloud-provider=vagrant \\\r\n    --logtostderr=true\r\nRestart=always\r\nRestartSec=10\r\n[Install]\r\nWantedBy=kubernetes-master.target\r\n\r\n==> /etc/systemd/system/kube-controller-manager.service <==\r\n[Unit]\r\nAfter=install-kubernetes.service\r\nAfter=kube-apiserver.service\r\nConditionFileIsExecutable=/opt/kubernetes/server/bin/kube-controller-manager\r\nDescription=Kubernetes Controller Manager\r\nDocumentation=http://kubernetes.io/\r\nWants=kube-apiserver.service\r\nWants=install-kubernetes.service\r\nConditionHost=kube-00\r\n[Service]\r\nExecStart=/opt/kubernetes/server/bin/kube-controller-manager \\\r\n    --master=127.0.0.1:8080 \\\r\n    --service-account-private-key-file=\"/var/run/kubernetes/apiserver.key\" \\\r\n    --root-ca-file=\"/var/run/kubernetes/apiserver.crt\" \\\r\n    --logtostderr=true \r\nRestart=always\r\nRestartSec=10\r\n[Install]\r\nWantedBy=kubernetes-master.target\r\n\r\n==> /etc/systemd/system/kube-create-addons.service <==\r\n[Unit]\r\nAfter=install-kubernetes.service\r\nConditionFileIsExecutable=/opt/kubernetes/server/bin/kubectl\r\nConditionPathIsDirectory=/etc/kubernetes/addons/\r\nConditionHost=kube-00\r\nDescription=Kubernetes Addons\r\nDocumentation=http://kubernetes.io/\r\nWants=install-kubernetes.service\r\nWants=kube-apiserver.service\r\n[Service]\r\nType=oneshot\r\nRemainAfterExit=no\r\nExecStart=/bin/bash -c 'until /opt/kubernetes/server/bin/kubectl create -f /etc/kubernetes/addons/; do sleep 2; done'\r\nSuccessExitStatus=1\r\n[Install]\r\nWantedBy=kubernetes-master.target\r\n\r\n==> /etc/systemd/system/kube-proxy.service <==\r\n[Unit]\r\nAfter=install-kubernetes.service\r\nConditionFileIsExecutable=/opt/kubernetes/server/bin/kube-proxy\r\nDescription=Kubernetes Proxy\r\nDocumentation=http://kubernetes.io/\r\nWants=install-kubernetes.service\r\n[Service]\r\nExecStart=/opt/kubernetes/server/bin/kube-proxy \\\r\n     --master=http://kube-00:8080 \\\r\n     --logtostderr=true\r\nRestart=always\r\nRestartSec=10\r\n[Install]\r\nWantedBy=kubernetes-master.target\r\nWantedBy=kubernetes-node.target\r\n\r\n==> /etc/systemd/system/kube-scheduler.service <==\r\n[Unit]\r\nAfter=kube-apiserver.service\r\nAfter=install-kubernetes.service\r\nConditionFileIsExecutable=/opt/kubernetes/server/bin/kube-scheduler\r\nDescription=Kubernetes Scheduler\r\nDocumentation=http://kubernetes.io/\r\nWants=kube-apiserver.service\r\nConditionHost=kube-00\r\n[Service]\r\nExecStart=/opt/kubernetes/server/bin/kube-scheduler \\\r\n    --logtostderr=true \\\r\n    --master=127.0.0.1:8080\r\nRestart=always\r\nRestartSec=10\r\n[Install]\r\nWantedBy=kubernetes-master.target\r\n\r\n==> /etc/systemd/system/kubelet.service <==\r\n[Unit]\r\nAfter=install-kubernetes.service\r\nConditionFileIsExecutable=/opt/kubernetes/server/bin/kubelet\r\nDescription=Kubernetes Kubelet\r\nDocumentation=http://kubernetes.io/\r\nWants=install-kubernetes.service\r\nConditionHost=!kube-00\r\n[Service]\r\nExecStartPre=/bin/mkdir -p /etc/kubernetes/manifests/\r\nExecStart=/opt/kubernetes/server/bin/kubelet \\\r\n    --docker-endpoint=unix:/var/run/weave/weave.sock \\\r\n    --address=0.0.0.0 \\\r\n    --port=10250 \\\r\n    --hostname-override=%H \\\r\n    --api-servers=http://kube-00:8080 \\\r\n    --logtostderr=true \\\r\n    --cluster-dns=10.16.0.3 \\\r\n    --cluster-domain=kube.local \\\r\n    --config=/etc/kubernetes/manifests/\r\nRestart=always\r\nRestartSec=10\r\n[Install]\r\nWantedBy=kubernetes-node.target\r\n```"}}