mirror of
https://github.com/k3s-io/k3s.git
synced 2026-04-08 10:53:13 -04:00
45 lines
966 B
YAML
45 lines
966 B
YAML
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: rancher/mirrored-library-busybox:1.37.0
|
|
args: ['sh', '-c', 'echo Welcome to nginx! > index.html; hostname > name.html; httpd -vvf']
|
|
imagePullPolicy: Always
|
|
name: client-wget
|
|
affinity:
|
|
podAntiAffinity:
|
|
requiredDuringSchedulingIgnoredDuringExecution:
|
|
- labelSelector:
|
|
matchExpressions:
|
|
- key: app
|
|
operator: In
|
|
values:
|
|
- client
|
|
topologyKey: kubernetes.io/hostname
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: client-wget
|
|
labels:
|
|
app: client
|
|
service: client-wget
|
|
spec:
|
|
type: ClusterIP
|
|
selector:
|
|
app: client
|
|
ports:
|
|
- port: 8080
|