步骤如下
1 开启日志插件
2 项目中开启落盘日志,发现无法收集磁盘上的日志,然后关闭日志
3 devops发布服务能够发布成功但是无法启动pod
想了解下日志是如何监听的?为什么会出现如图所示的错误呢?


apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
deployment.kubernetes.io/revision: “2”
creationTimestamp: “2021-07-22T06:53:06Z”
generation: 2
managedFields:
- apiVersion: apps/v1
fieldsType: FieldsV1
fieldsV1:
f:spec:
f:progressDeadlineSeconds: {}
f:replicas: {}
f:revisionHistoryLimit: {}
f:selector:
f:matchLabels:
.: {}
f:app: {}
f:strategy:
f:rollingUpdate:
.: {}
f:maxSurge: {}
f:maxUnavailable: {}
f:type: {}
f:template:
f:metadata:
f:labels:
.: {}
f:app: {}
f:spec:
f:containers:
k:{“name”:“simo-conn-enduser-web”}:
.: {}
f:image: {}
f:imagePullPolicy: {}
f:name: {}
f:ports:
.: {}
k:{“containerPort”:80,“protocol”:“TCP”}:
.: {}
f:containerPort: {}
f:protocol: {}
f:resources: {}
f:terminationMessagePath: {}
f:terminationMessagePolicy: {}
f:volumeMounts:
.: {}
k:{“mountPath”:“/etc/nginx/conf.d”}:
.: {}
f:mountPath: {}
f:name: {}
f:dnsPolicy: {}
f:restartPolicy: {}
f:schedulerName: {}
f:securityContext: {}
f:terminationGracePeriodSeconds: {}
f:volumes:
.: {}
k:{“name”:“nginx-cm”}:
.: {}
f:configMap:
.: {}
f:defaultMode: {}
f:name: {}
f:name: {}
manager: OpenAPI-Generator
operation: Update
time: “2021-07-22T06:53:06Z”
- apiVersion: apps/v1
fieldsType: FieldsV1
fieldsV1:
f:metadata:
f:annotations:
.: {}
f:deployment.kubernetes.io/revision: {}
f:status:
f:conditions:
.: {}
k:{“type”:“Available”}:
.: {}
f:lastTransitionTime: {}
f:lastUpdateTime: {}
f:message: {}
f:reason: {}
f:status: {}
f:type: {}
k:{“type”:“Progressing”}:
.: {}
f:lastTransitionTime: {}
f:lastUpdateTime: {}
f:message: {}
f:reason: {}
f:status: {}
f:type: {}
k:{“type”:“ReplicaFailure”}:
.: {}
f:lastTransitionTime: {}
f:lastUpdateTime: {}
f:message: {}
f:reason: {}
f:status: {}
f:type: {}
f:observedGeneration: {}
f:unavailableReplicas: {}
manager: kube-controller-manager
operation: Update
time: “2021-07-22T06:53:06Z”
- apiVersion: apps/v1
fieldsType: FieldsV1
fieldsV1:
f:spec:
f:template:
f:metadata:
f:annotations:
.: {}
f:kubesphere.io/restartedAt: {}
manager: Mozilla
operation: Update
time: “2021-07-22T07:19:43Z”
name: simo-conn-enduser-web
namespace: iot
resourceVersion: “155052845”
selfLink: /apis/apps/v1/namespaces/iot/deployments/simo-conn-enduser-web
uid: 5c693b71-2297-4810-aa7e-1548883bdc43
spec:
progressDeadlineSeconds: 600
replicas: 1
revisionHistoryLimit: 10
selector:
matchLabels:
app: simo-conn-enduser-web
strategy:
rollingUpdate:
maxSurge: 25%
maxUnavailable: 25%
type: RollingUpdate
template:
metadata:
annotations:
kubesphere.io/restartedAt: “2021-07-22T07:19:43.499Z”
creationTimestamp: null
labels:
app: simo-conn-enduser-web
spec:
containers:
- image: 815797196350.dkr.ecr.cn-northwest-1.amazonaws.com.cn/iot/dev/simo-conn-enduser-web:63b08b4
imagePullPolicy: IfNotPresent
name: simo-conn-enduser-web
ports:
- containerPort: 80
protocol: TCP
resources: {}
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
- mountPath: /etc/nginx/conf.d
name: nginx-cm
dnsPolicy: ClusterFirst
restartPolicy: Always
schedulerName: default-scheduler
securityContext: {}
terminationGracePeriodSeconds: 30
volumes:
- configMap:
defaultMode: 420
name: nginx-cm
name: nginx-cm
status:
conditions:
- lastTransitionTime: “2021-07-22T06:53:06Z”
lastUpdateTime: “2021-07-22T06:53:06Z”
message: Deployment does not have minimum availability.
reason: MinimumReplicasUnavailable
status: “False”
type: Available
- lastTransitionTime: “2021-07-22T06:53:06Z”
lastUpdateTime: “2021-07-22T06:53:06Z”
message: ’Internal error occurred: failed calling webhook “logsidecar-injector.logging.kubesphere.io”:
Post “https://logsidecar-injector-admission.kubesphere-logging-system.svc:443/?timeout=30s”:
service “logsidecar-injector-admission” not found’
reason: FailedCreate
status: “True”
type: ReplicaFailure
- lastTransitionTime: “2021-07-22T07:19:43Z”
lastUpdateTime: “2021-07-22T07:19:43Z”
message: Created new replica set “simo-conn-enduser-web-77bd5dbbc5”
reason: NewReplicaSetCreated
status: “True”
type: Progressing
observedGeneration: 2
unavailableReplicas: 2