我试图在Rancher 2.2上执行一个简单的工作,却无法运行一个hello world或我发现的任何示例性工作。
起初,我以为是导致此问题的我们的自定义目录(这是我试图创建基于头盔的作业工作负载的地方),但后来意识到,通过工作负载向导创建的工作负载也永远不会运行。我还尝试了直接使用rancher cli kubectl界面从命令行创建示例工作负载。在允许将工作安排在我们拥有的测试集群中时,我缺少什么吗?以下工作的相关信息。
创建工作
rancher kubectl apply -f https://k8s.io/examples/controllers/job.yaml
Pi示例Job Yaml Dump
apiVersion: batch/v1
kind: Job
metadata:
creationTimestamp: "2019-06-19T12:48:09Z"
labels:
controller-uid: 7db1fd73-9290-11e9-ac59-02b72a75e772
job-name: pi
name: pi
namespace: default
resourceVersion: "191427"
selfLink: /apis/batch/v1/namespaces/default/jobs/pi
uid: 7db1fd73-9290-11e9-ac59-02b72a75e772
spec:
backoffLimit: 4
completions: 1
parallelism: 1
selector:
matchLabels:
controller-uid: 7db1fd73-9290-11e9-ac59-02b72a75e772
template:
metadata:
creationTimestamp: null
labels:
controller-uid: 7db1fd73-9290-11e9-ac59-02b72a75e772
job-name: pi
spec:
containers:
- command:
- perl
- -Mbignum=bpi
- -wle
- print bpi(2000)
image: perl
imagePullPolicy: Always
name: pi
resources: {}
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
dnsPolicy: ClusterFirst
restartPolicy: Never
schedulerName: default-scheduler
securityContext: {}
terminationGracePeriodSeconds: 30
status: {}
描述输出:
rancher kubectl describe jobs/pi
Name: pi
Namespace: default
Selector: controller-uid=7db1fd73-9290-11e9-ac59-02b72a75e772
Labels: controller-uid=7db1fd73-9290-11e9-ac59-02b72a75e772
job-name=pi
Annotations: <none>
Parallelism: 1
Completions: 1
Pods Statuses: 0 Running / 0 Succeeded / 0 Failed
Pod Template:
Labels: controller-uid=7db1fd73-9290-11e9-ac59-02b72a75e772
job-name=pi
Containers:
pi:
Image: perl
Port: <none>
Host Port: <none>
Command:
perl
-Mbignum=bpi
-wle
print bpi(2000)
Environment: <none>
Mounts: <none>
Volumes: <none>
Events: <none>
Rancher用户界面
perl
0 Pods / Created 15 minutes ago