A
A
Anton Patsev2018-10-05 14:38:41
Kubernetes
Anton Patsev, 2018-10-05 14:38:41

How to fix "local-volume-provisioner-system-node" is invalid: subjects[0].namespace: Required value error?

Good afternoon!
I do according to the article
https://scalablesystem.design/ds101/kubernetes-ins...
git clone https://github.com/kubernetes-incubator/kubespray.git
cd kubespray
cp -rfp inventory/sample inventory/mycluster
cd inventory/ mycluster/
declare -a IPS=(10.233.60.232 10.233.60.226 10.233.60.240)
CONFIG_FILE=inventory/mycluster/hosts.ini python3 contrib/inventory_builder/inventory.py ${IPS[@]}
pip install -r requirements.txt
ansible -playbook -u apatsev -i inventory/mycluster/hosts.ini cluster.yml -b


"error running kubectl (/usr/local/bin/kubectl apply --force --filename=/etc/kubernetes/addons/local_volume_provisioner/local-volume-provisioner-ns.yml) command (rc=1), out=' ', err='error: error validating \"/etc/kubernetes/addons/local_volume_provisioner/local-volume-provisioner-ns.yml\": error validating data: unknown object type \"nil\" in Namespace.metadata.labels .name; if you choose to ignore these errors, turn validation off with --validate=false\n'"}

and

err='Error from server (Invalid): error when creating \"/etc/kubernetes/addons/local_volume_provisioner/local-volume-provisioner-clusterrolebinding.yml\": ClusterRoleBinding.rbac.authorization.k8s.io \"local-volume -provisioner-system-persistent-volume-provisioner\" is invalid: subjects[0].namespace: Required value\nError from server (Invalid): error when creating \"/etc/kubernetes/addons/local_volume_provisioner/local-volume- provisioner-clusterrolebinding.yml\": ClusterRoleBinding.rbac.authorization.k8s.io \"local-volume-provisioner-system-node\" is invalid: subjects[0].namespace: Required value\n'"}

Full log here
https://paste.ubuntu.com/p/xvS4rZQYH8/

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton, 2018-10-05
Patsev @chemtech

Either set the local_volume_provisioner_namespace variable to "kube-system"
or remove the local_volume_provisioner_namespace variable

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question