Added example about targeting deployments through the use of selectors (targeting labels)
This commit is contained in:
parent
9ee02f7713
commit
20d69656fd
42
Istio/06-AuthorizationPolicy/03-target-deployments/deployment_2.yaml
Executable file
42
Istio/06-AuthorizationPolicy/03-target-deployments/deployment_2.yaml
Executable file
@ -0,0 +1,42 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: byeworld
|
||||
labels:
|
||||
app: byeworld
|
||||
service: byeworld
|
||||
namespace: foo
|
||||
spec:
|
||||
ports:
|
||||
- port: 9090
|
||||
name: http
|
||||
targetPort: 80
|
||||
selector:
|
||||
app: byeworld
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: byeworld-nginx
|
||||
labels:
|
||||
app: byeworld
|
||||
namespace: foo
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: byeworld
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: byeworld
|
||||
spec:
|
||||
containers:
|
||||
- name: byeworld
|
||||
image: nginx
|
||||
resources:
|
||||
requests:
|
||||
cpu: "100m"
|
||||
imagePullPolicy: IfNotPresent
|
||||
ports:
|
||||
- containerPort: 80
|
Loading…
x
Reference in New Issue
Block a user