@@ -150,11 +150,14 @@ The credentials of the service principal are provided to ExternalDNS as environm
150150
151151### Manifest (for clusters without RBAC enabled)
152152``` yaml
153- apiVersion : extensions/v1beta1
153+ apiVersion : apps/v1
154154kind : Deployment
155155metadata :
156156 name : externaldns
157157spec :
158+ selector :
159+ matchLabels :
160+ app : externaldns
158161 strategy :
159162 type : Recreate
160163 template :
@@ -196,7 +199,7 @@ rules:
196199- apiGroups : [""]
197200 resources : ["services","endpoints","pods"]
198201 verbs : ["get","watch","list"]
199- - apiGroups : ["extensions"]
202+ - apiGroups : ["extensions","networking.k8s.io"]
200203 resources : ["ingresses"]
201204 verbs : ["get","watch","list"]
202205- apiGroups : [""]
@@ -216,11 +219,14 @@ subjects:
216219 name : externaldns
217220 namespace : default
218221---
219- apiVersion : extensions/v1beta1
222+ apiVersion : apps/v1
220223kind : Deployment
221224metadata :
222225 name : externaldns
223226spec :
227+ selector :
228+ matchLabels :
229+ app : externaldns
224230 strategy :
225231 type : Recreate
226232 template :
@@ -267,7 +273,7 @@ rules:
267273- apiGroups: [""]
268274 resources: ["services","endpoints","pods"]
269275 verbs: ["get","watch","list"]
270- - apiGroups: ["extensions"]
276+ - apiGroups: ["extensions","networking.k8s.io" ]
271277 resources: ["ingresses"]
272278 verbs: ["get","watch","list"]
273279---
@@ -283,11 +289,14 @@ subjects:
283289- kind: ServiceAccount
284290 name: externaldns
285291---
286- apiVersion: extensions/v1beta1
292+ apiVersion: apps/v1
287293kind: Deployment
288294metadata:
289295 name: externaldns
290296spec:
297+ selector:
298+ matchLabels:
299+ app: externaldns
291300 strategy:
292301 type: Recreate
293302 template:
@@ -326,11 +335,14 @@ $ kubectl create -f externaldns.yaml
326335Create a service file called 'nginx.yaml' with the following contents :
327336
328337` ` ` yaml
329- apiVersion: extensions/v1beta1
338+ apiVersion: apps/v1
330339kind: Deployment
331340metadata:
332341 name: nginx
333342spec:
343+ selector:
344+ matchLabels:
345+ app: nginx
334346 template:
335347 metadata:
336348 labels:
@@ -356,7 +368,7 @@ spec:
356368 type: ClusterIP
357369
358370---
359- apiVersion: extensions /v1beta1
371+ apiVersion: networking.k8s.io /v1beta1
360372kind: Ingress
361373metadata:
362374 name: nginx
0 commit comments