Skip to content

Commit 851c4f9

Browse files
author
Power Cloud Robot
authored
Merge pull request ppc64le-cloud#75 from Rajalakshmi-Girish/images-import
Task to import container images to nodes
2 parents 54bdefb + ddaae01 commit 851c4f9

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

roles/download-k8s/tasks/main.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,15 @@
1717
with_items: "{{ k8s_tar_bundles }}"
1818
retries: 3
1919
delay: 5
20+
21+
- name: Import container images
22+
shell: |
23+
export ARCH={{ ansible_architecture }}
24+
ctr -n k8s.io images import "/usr/local/bin/{{ item }}.tar"
25+
ctr -n k8s.io images ls -q | grep -e {{ item }} | xargs -L 1 -I '{}' /bin/bash -c 'ctr -n k8s.io images tag "{}" "$(echo "{}" | sed s/-'$ARCH':/:/)"'
26+
with_items:
27+
- kube-apiserver
28+
- kube-controller-manager
29+
- kubectl
30+
- kube-proxy
31+
- kube-scheduler

0 commit comments

Comments
 (0)