47 lines
913 B
YAML
47 lines
913 B
YAML
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: guestbook-clone-svc
|
|
labels:
|
|
app: guestbook
|
|
spec:
|
|
ports:
|
|
- port: 3000
|
|
targetPort: http-server
|
|
name: guestbook-port
|
|
- port: 4000
|
|
targetPort: sidecar-server
|
|
name: sidecar-port
|
|
selector:
|
|
app.kubernetes.io/name: guestbook-clone
|
|
type: NodePort
|
|
|
|
---
|
|
|
|
apiVersion: apps.kruise.io/v1alpha1
|
|
kind: CloneSet
|
|
metadata:
|
|
name: guestbook-clone
|
|
labels:
|
|
app.kubernetes.io/name: guestbook-clone
|
|
spec:
|
|
replicas: 3
|
|
selector:
|
|
matchLabels:
|
|
app.kubernetes.io/name: guestbook-clone
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app.kubernetes.io/name: guestbook-clone
|
|
spec:
|
|
containers:
|
|
- name: guestbook
|
|
image: openkruise/guestbook:v2
|
|
imagePullPolicy: Always
|
|
ports:
|
|
- name: http-server
|
|
containerPort: 3000
|
|
updateStrategy:
|
|
type: InPlaceIfPossible
|
|
maxUnavailable: 3
|