mirror of https://github.com/k3s-io/k3s
Merge pull request #53121 from WanLinghao/kube_dns_already_exist
Automatic merge from submit-queue (batch tested with PRs 52634, 53121, 53161). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. fix clusterrolebindings duplicate create in local-up-cluster.sh Changes to be committed: modified: hack/local-up-cluster.sh **What this PR does / why we need it**: currently ,execute hack/local-up-cluster.sh will produce an error : > Creating kube-system namespace > Error from server (AlreadyExists): clusterrolebindings.rbac.authorization.k8s.io "system:kube-dns" > already exists > serviceaccount "kube-dns" created it was caused by duplicate creation in script. kube-api-server with RBAC option creates system:kube-dns and kubectl create it again. **Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes # **Special notes for your reviewer**: **Release note**: ```release-note ```pull/6/head
commit
dc7ff475d0
|
@ -760,7 +760,6 @@ function start_kubedns {
|
|||
sed -e "s/{{ pillar\['dns_server'\] }}/${DNS_SERVER_IP}/g" "${KUBE_ROOT}/cluster/addons/dns/kubedns-svc.yaml.in" >| kubedns-svc.yaml
|
||||
|
||||
# TODO update to dns role once we have one.
|
||||
${KUBECTL} --kubeconfig="${CERT_DIR}/admin.kubeconfig" create clusterrolebinding system:kube-dns --clusterrole=cluster-admin --serviceaccount=kube-system:default
|
||||
# use kubectl to create kubedns deployment and service
|
||||
${KUBECTL} --kubeconfig="${CERT_DIR}/admin.kubeconfig" --namespace=kube-system create -f ${KUBE_ROOT}/cluster/addons/dns/kubedns-sa.yaml
|
||||
${KUBECTL} --kubeconfig="${CERT_DIR}/admin.kubeconfig" --namespace=kube-system create -f ${KUBE_ROOT}/cluster/addons/dns/kubedns-cm.yaml
|
||||
|
|
Loading…
Reference in New Issue