有没有用过k8s中的cronjob的
这是我的yaml文件
apiVersion: batch/v1
kind: CronJob
metadata:
name: cronjob
spec:
schedule: " */1 * * * * "
jobTemplate:
spec:
template:
spec:
restartPolicy: OnFailure
containers:
- name: busybox
image: busybox
imagePullPolicy: IfNotPresent
command: ["/bin/sh","-c","echo `date`;"]
为什么我启动任务后创建的容器会报这个错
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal Scheduled 63s default-scheduler Successfully assigned default/cronjob-27576244--1-wh72p to k8s-worker-node1
Normal AddedInterface 63s multus Add eth0 [10.244.1.19/24] from cbr0
Normal Pulled 63s kubelet Container image "busybox" already present on machine
Normal Created 63s kubelet Created container busybox
Normal Started 63s kubelet Started container busybox
Warning FailedMount 61s (x3 over 62s) kubelet MountVolume.SetUp failed for volume "kube-api-access-hlcvm" : object "default"/"kube-root-ca.crt" not registered