Я использую kubernetes на докере для Windows.
И я хочу использовать Kaniko, но не могу создать образ на локальных kubernetes.
Dockerfile
FROM ubuntu:18.04
RUN apt update
RUN apt install -y ssh
kanikopod.yaml
apiVersion: v1
kind: Pod
metadata:
name: kaniko
spec:
containers:
- image: gcr.io/kaniko-project/executor:latest
args:
- --dockerfile=/mnt/Dockerfile
- --context= /mnt
- --no-push
name: kaniko
command:
- sleep
- infinity
volumeMounts:
- mountPath: /mnt
name: mount-volume
restartPolicy: Never
volumes:
- name: mount-volume
persistentVolumeClaim:
claimName: kaniko-workspace
Но произошла ошибка ContainerCannotRun.
kubectl описать стручки kaniko
результат
Name: kaniko
Namespace: default
Priority: 0
PriorityClassName: <none>
Node: docker-desktop/192.168.65.3
Start Time: Mon, 06 May 2019 18:13:47 +0900
Labels: <none>
Annotations: kubectl.kubernetes.io/last-applied-configuration:
{"apiVersion":"v1","kind":"Pod","metadata":{"annotations":{},"name":"kaniko","namespace":"default"},"spec":{"containers":[{"args":["--dock...
Status: Pending
IP:
Containers:
kaniko:
Container ID:
Image: gcr.io/kaniko-project/executor:latest
Image ID:
Port: <none>
Host Port: <none>
Command:
sleep
infinity
Args:
--dockerfile=/mnt/Dockerfile
--context= /mnt
--no-push
State: Waiting
Reason: ContainerCreating
Ready: False
Restart Count: 0
Environment: <none>
Mounts:
/mnt from mount-volume (rw)
/var/run/secrets/kubernetes.io/serviceaccount from default-token-spjnr (ro)
Conditions:
Type Status
Initialized True
Ready False
ContainersReady False
PodScheduled True
Volumes:
mount-volume:
Type: PersistentVolumeClaim (a reference to a PersistentVolumeClaim in the same namespace)
ClaimName: kaniko-workspace
ReadOnly: false
default-token-spjnr:
Type: Secret (a volume populated by a Secret)
SecretName: default-token-spjnr
Optional: false
QoS Class: BestEffort
Node-Selectors: <none>
Tolerations: node.kubernetes.io/not-ready:NoExecute for 300s
node.kubernetes.io/unreachable:NoExecute for 300s
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal Scheduled 4s default-scheduler Successfully assigned default/kaniko to docker-desktop
kubectl logs kaniko
Но выхода не было.
Я думаю, что опция "--destination =" необходима для kaniko, но я не могу найти информацию.
Что мне делать?