kind: ReplicaSet
apiVersion: apps/v1
metadata:
name: solr
labels:
app: solr
namespace: solr
spec:
replicas: 1
selector:
matchLabels:
app: solr
template:
metadata:
labels:
app: solr
spec:
hostAliases:
- ip: IP
hostnames:
- zkserver1
volumes:
- name: solrdata #跟上面的名称对应
hostPath:
path: /solrdata/solr
containers:
- name: solr
image: host/solr6/solr6:1.2020.5
ports:
- name: solr
containerPort: 8983
protocol: TCP
volumeMounts: #容器内挂载点
- name: solrdata
mountPath: /opt/solr/server/solr
livenessProbe:
httpGet:
path: '/solr/#/'
port: 8983
scheme: HTTP
initialDelaySeconds: 40
timeoutSeconds: 2
periodSeconds: 10
successThreshold: 1
failureThreshold: 3