mirror of
https://github.com/notherealmarco/coredns-deployment.git
synced 2025-05-05 20:42:33 +02:00
Keep manifest consistent with kubeadm (#69)
* change label to kube-dns * typo
This commit is contained in:
parent
39c9f7ed76
commit
fef283bc9e
2 changed files with 8 additions and 5 deletions
|
@ -29,6 +29,9 @@ $ ./deploy.sh | kubectl apply -f -
|
||||||
$ kubectl delete --namespace=kube-system deployment kube-dns
|
$ kubectl delete --namespace=kube-system deployment kube-dns
|
||||||
~~~
|
~~~
|
||||||
|
|
||||||
|
NOTE: It is recommended to delete the kube-dns deployment. Otherwise, if both CoreDNS and kube-dns are running, queries may randomly hit either
|
||||||
|
CoreDNS or kube-dns.
|
||||||
|
|
||||||
For non-RBAC deployments, you'll need to edit the resulting yaml before applying it:
|
For non-RBAC deployments, you'll need to edit the resulting yaml before applying it:
|
||||||
1. Remove the line `serviceAccountName: coredns` from the `Deployment` section.
|
1. Remove the line `serviceAccountName: coredns` from the `Deployment` section.
|
||||||
2. Remove the `ServiceAccount`, `ClusterRole`, and `ClusterRoleBinding` sections.
|
2. Remove the `ServiceAccount`, `ClusterRole`, and `ClusterRoleBinding` sections.
|
||||||
|
|
|
@ -65,7 +65,7 @@ metadata:
|
||||||
name: coredns
|
name: coredns
|
||||||
namespace: kube-system
|
namespace: kube-system
|
||||||
labels:
|
labels:
|
||||||
k8s-app: coredns
|
k8s-app: kube-dns
|
||||||
kubernetes.io/name: "CoreDNS"
|
kubernetes.io/name: "CoreDNS"
|
||||||
spec:
|
spec:
|
||||||
replicas: 2
|
replicas: 2
|
||||||
|
@ -75,11 +75,11 @@ spec:
|
||||||
maxUnavailable: 1
|
maxUnavailable: 1
|
||||||
selector:
|
selector:
|
||||||
matchLabels:
|
matchLabels:
|
||||||
k8s-app: coredns
|
k8s-app: kube-dns
|
||||||
template:
|
template:
|
||||||
metadata:
|
metadata:
|
||||||
labels:
|
labels:
|
||||||
k8s-app: coredns
|
k8s-app: kube-dns
|
||||||
spec:
|
spec:
|
||||||
serviceAccountName: coredns
|
serviceAccountName: coredns
|
||||||
tolerations:
|
tolerations:
|
||||||
|
@ -129,12 +129,12 @@ metadata:
|
||||||
annotations:
|
annotations:
|
||||||
prometheus.io/scrape: "true"
|
prometheus.io/scrape: "true"
|
||||||
labels:
|
labels:
|
||||||
k8s-app: coredns
|
k8s-app: kube-dns
|
||||||
kubernetes.io/cluster-service: "true"
|
kubernetes.io/cluster-service: "true"
|
||||||
kubernetes.io/name: "CoreDNS"
|
kubernetes.io/name: "CoreDNS"
|
||||||
spec:
|
spec:
|
||||||
selector:
|
selector:
|
||||||
k8s-app: coredns
|
k8s-app: kube-dns
|
||||||
clusterIP: CLUSTER_DNS_IP
|
clusterIP: CLUSTER_DNS_IP
|
||||||
ports:
|
ports:
|
||||||
- name: dns
|
- name: dns
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue