Offline Pod support
In the event of a network outage for a gateway, the Pods assigned to that gateway will remain running. If the gateway reboots during this outage, the gateway restarts any Pods that were running before the reboot.
For offline operation, ensure:
-
Containers have
imagePullPolicy: IfNotPresent
. -
Manually created Pods have the below tolerations:
"tolerations": [ { "effect": "NoExecute", "key": "node.kubernetes.io/not-ready", "operator": "Exists" }, { "effect": "NoExecute", "key": "node.kubernetes.io/unreachable", "operator": "Exists" } ],
DaemonSets automatically apply these tolerations and more.
Note: To support this, kubelet stores a copy of all Pods assigned to it, along with any resources needed by those Pods, such as ConfigMaps, Secrets and PersistentVolumes to disk.
Disabling offline Pod support with snapcraft
Offline Pod support is enabled by default. If you are using snapcraft, you can disable offline mode for Kubelet by using this command on the gateway:
snap set pelion-edge kubelet.offline-mode=false
To enable offline mode again, use this command on the gateway:
snap set pelion-edge kubelet.offline-mode=true