老师,这个是我启动pod的yaml文件,共计有10台服务器,
apiVersion: v1
kind: ReplicationController
metadata:
name: spider-cpu-demo
spec:
replicas: 50
selector:
app: spider-cpu-demo
template:
metadata:
labels:
app: spider-cpu-demo
spec:
containers:
- name: spider-cpu-demo-container
image: scrapinghub/splash
ports:
- containerPort: 8050
resources:
requests:
memory: "1Gi"
cpu: "300m"
limits:
memory: "1.5Gi"
cpu: "1"
这个是开启service的yaml文件
apiVersion: v1
kind: Service
metadata:
name: spider01-svc
labels:
name: spider01-svc
spec:
type: NodePort
selector:
app: spider01
ports:
- port: 8050
targetPort: 8050
protocol: TCP
当我有个程序去调用开启的这个服务之后,开始的时候会调用服务会比较流畅,当过了几个小时时候,程序就处于sleep状态,不再调用这个服务了,这个是什么原因呢?