Skip to content

kubectl create -f apache.json fails #75

Description

@pecameron

kubectl create -f apache.json

Error from server: error when creating "apache.json": Pod "apache-pod" is forbidden: no API token found for service account default/default, retry after the token is automatically created and added to the service account

dcbw found the reason for this. "ServiceAccount" needs to be removed from
/etc/kubernetes/apiserver
KUBE_ADMISSION_CONTROL="--admission-control=NamespaceLifecycle,NamespaceExists,LimitRanger,SecurityContextDeny,ResourceQuota"

systemctl restart kube-apiserver

and all is well

kubectl create -f apache.json

pods/apache-pod

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions