mirror of https://github.com/k3s-io/k3s
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
45 lines
854 B
45 lines
854 B
2 years ago
|
apiVersion: apps/v1
|
||
|
kind: Deployment
|
||
|
metadata:
|
||
|
labels:
|
||
|
app: client
|
||
|
name: client-deployment
|
||
|
spec:
|
||
|
replicas: 2
|
||
|
selector:
|
||
|
matchLabels:
|
||
|
app: client
|
||
|
template:
|
||
|
metadata:
|
||
|
labels:
|
||
|
app: client
|
||
|
spec:
|
||
|
containers:
|
||
|
- image: ranchertest/mytestcontainer
|
||
|
imagePullPolicy: Always
|
||
|
name: client-curl
|
||
|
affinity:
|
||
|
podAntiAffinity:
|
||
|
requiredDuringSchedulingIgnoredDuringExecution:
|
||
|
- labelSelector:
|
||
|
matchExpressions:
|
||
|
- key: app
|
||
|
operator: In
|
||
|
values:
|
||
|
- client
|
||
|
topologyKey: kubernetes.io/hostname
|
||
|
---
|
||
|
apiVersion: v1
|
||
|
kind: Service
|
||
|
metadata:
|
||
|
name: client-curl
|
||
|
labels:
|
||
|
app: client
|
||
|
service: client-curl
|
||
|
spec:
|
||
|
type: ClusterIP
|
||
|
selector:
|
||
|
app: client
|
||
|
ports:
|
||
|
- port: 8080
|