TurnToJPG -->


1. download items

In kubespray-2.8.1/roles/download/defaults/main.yml, get download info from following definition:

kubeadm_download_url: "{{ kubead
m_version }}/bin/linux/{{ image_arch }}/kubeadm"
hyperkube_download_url: "{{ kube
_version }}/bin/linux/amd64/hyperkube"
cni_download_url: "{{ cni
_version }}/cni-plugins-{{ image_arch }}-{{ cni_version }}.tgz"

The cni_version is defined in following file:

./roles/download/defaults/main.yml:cni_version: "v0.6.0"

Download from following position:

Changes to:

#kubeadm_download_url: "{{ kubeadm_version }}/bin/linux/{{ image_arch }}/kubeadm"
#hyperkube_download_url: "{{ kube_version }}/bin/linux/amd64/hyperkube"
etcd_download_url: "{{ etcd_version }}/etcd-{{ etcd_version }}-linux-amd64.tar.gz"
#cni_download_url: "{{ cni_version }}/cni-plugins-{{ image_arch }}-{{ cni_version }}.tgz"
kubeadm_download_url: ""
hyperkube_download_url: ""
cni_download_url: "{{ image_arch }}-{{ cni_version }}.tgz"

2. dashboard

kubespray-2.8.1/roles/kubernetes-apps/ansible/templates/dashboard.yml.j2, add NodePort definition:

+  type: NodePort
    - port: 443
      targetPort: 8443

3. bootstrap-os

Added in files:


kubespray-2.8.1/roles/bootstrap-os/tasks/bootstrap-ubuntu.yml, modify according to previous version.

4. kube-deploy

TBD, changes later

5. reset


    - /etc/cni
    - "{{ nginx_config_dir }}"
#    - /etc/dnsmasq.d
#    - /etc/dnsmasq.conf
#    - /etc/dnsmasq.d-available

6. inventory definition


enable helm and metric-server

Edit kubespray-2.8.1/inventory/sample/group_vars/k8s-cluster/k8s-cluster.yml file:

helm_stable_repo_url: ""

also notice the version of kubeadm, for example v1.12.4

remove the hosts.ini file.

7. kubeadm images

Use an official vagrant definition for downloading kubeadm images.

Vagrant temp

Vagrant create temp machines.

Stop the service:

sudo systemcel stop secureregistryserver.service

Remove the old registry data, and start a new instance

sudo rm -rf /usr/local/secureregistryserver/data/*
sudo systemcel start secureregistryserver.service


scp ./all.tar.bz2 vagrant@
sudo docker load<all.tar.bz2

Then docker push all of the loaded images, compress the folder:

sudo systemcel stop secureregistryserver.service
tar cvf /usr/local/secureregistryserver/
xz /usr/local/secureregistryserver.tar

With the tar.xz, contains all of the offline images.