创建部署问题时,请参考下面模板,你提供的信息越多,越容易及时获得解答。如果未按模板创建问题,管理员有权关闭问题。
确保帖子格式清晰易读,用 markdown code block 语法格式化代码块。
你只花一分钟创建的问题,不能指望别人花上半个小时给你解答。
操作系统信息
虚拟机,Centos7.5
Kubernetes版本信息
将 kubectl version
命令执行结果贴在下方
容器运行时
Version: 0.1.0
RuntimeName: containerd
RuntimeVersion: v1.6.23
RuntimeApiVersion: v1
KubeSphere版本信息:3.4.0, k8s 1.25
问题是什么
删除一个 statefullset资源,结果空间下的svc 都没了(总共7个svc),复现了2次
审计日志如下
元数据
@timestamp:
2024-01-10T13:18:25.215Z
AuditID:
21eb5d5c-e8fe-4fec-920c-0f4adb8de617
Cluster:
Devops:
Level:
Metadata
Message:
ObjectRef 8 item
APIGroup:
apps
APIVersion:
v1
Name:
oracle-11g
Namespace:
jd-dev
Resource:
statefulsets
ResourceVersion:
Namespace
Subresource:
UID:
RequestObject:
RequestReceivedTimestamp:
2024-01-10T21:18:23.45924+08:00
RequestURI:
/apis/apps/v1/namespaces/jd-dev/statefulsets/oracle-11g
ResponseObject:
ResponseStatus 2 item
code:
200
metadata 0 item
SourceIPs:
100.117.165.118
Stage:
ResponseComplete
StageTimestamp:
2024-01-10T21:18:23.466516+08:00
User 3 item
Groups:
system:authenticated
UID:
Username:
admin
Verb:
delete
Workspace:
zhdj-yangqi-line
logStripANSI:
undefined
ps:StatefulSet创建实例,不知道什么原因,影响很大,现在不敢乱删除了。。。
apiVersion: apps/v1
kind: StatefulSet
metadata:
labels:
app: oracle-11g
name: oracle-11g
spec:
replicas: 1
selector:
matchLabels:
app: oracle-11g
template:
metadata:
labels:
app: oracle-11g
annotations:
kubesphere.io/imagepullsecrets: '{}'
logging.kubesphere.io/logsidecar-config: '{}'
spec:
containers:
- name: oracle
imagePullPolicy: IfNotPresent
ports:
- name: tcp-0
protocol: TCP
containerPort: 1521
image: 'registry.example.com/dj/oracle-xe-11g:latest'
env:
- name: ORACLE_ALLOW_REMOTE
value: 'true'
- name: ORACLE_CHARACTERSET
value: AL32UTF8
volumeMounts:
- name: host-time
mountPath: /etc/localtime
readOnly: true
- name: oracle-data
readOnly: false
mountPath: /opt/oracle/oradata
volumes:
- hostPath:
path: /etc/localtime
type: ''
name: host-time
volumeClaimTemplates: