Skip to content

Commit a01645d

Browse files
authored
Merge pull request #259908 from AbhishekMallick-MS/Nov-30-2023-AKS
AKS doc updates
2 parents cffc251 + e3086b7 commit a01645d

File tree

1 file changed

+65
-66
lines changed

1 file changed

+65
-66
lines changed

articles/backup/azure-kubernetes-service-backup-overview.md

Lines changed: 65 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ ms.topic: conceptual
55
ms.service: backup
66
ms.custom:
77
- ignite-2023
8-
ms.date: 11/14/2023
8+
ms.date: 11/30/2023
99
author: AbhishekMallick-MS
1010
ms.author: v-abhmallick
1111
---
@@ -69,9 +69,6 @@ You can now use the Custom Hooks capability available in Azure Backup for AKS.
6969

7070
Azure Backup for AKS enables you to execute Custom Hooks as part of the backup and restore operation. Hooks are commands configured to run one or more commands to execute in a pod under a container during the backup operation or after restore. They allow you to define these hooks as a custom resource and deploy in the AKS cluster to be backed up or restored. Once the custom resource is deployed in the AKS cluster in the required Namespace, you need to provide the details as input for the Configure Backup/Restore flow, and the Backup extension runs the hooks as defined in the YAML file.
7171

72-
>[!Note]
73-
>Hooks aren't executed in a *shell* on the containers.
74-
7572
There are two types of hooks:
7673

7774
### Backup Hooks
@@ -88,43 +85,45 @@ metadata:
8885
name: bkphookname0
8986
namespace: default
9087
spec:
91-
# BackupHook Name. This is the name of the hook that will be executed during backup.
92-
# compulsory
93-
name: hook1
94-
# Namespaces where this hook will be executed.
95-
includedNamespaces:
96-
- hrweb
97-
excludedNamespaces:
98-
labelSelector:
99-
# PreHooks is a list of BackupResourceHooks to execute prior to backing up an item.
100-
preHooks:
101-
- exec:
102-
# Container is the container in the pod where the command should be executed.
103-
container: webcontainer
104-
# Command is the command and arguments to execute.
105-
command:
106-
- /bin/uname
107-
- -a
108-
# OnError specifies how Velero should behave if it encounters an error executing this hook
109-
onError: Continue
110-
# Timeout is the amount of time to wait for the hook to complete before considering it failed.
111-
timeout: 10s
112-
- exec:
113-
command:
114-
- /bin/bash
115-
- -c
116-
- echo hello > hello.txt && echo goodbye > goodbye.txt
117-
container: webcontainer
118-
onError: Continue
119-
# PostHooks is a list of BackupResourceHooks to execute after backing up an item.
120-
postHooks:
121-
- exec:
122-
container: webcontainer
123-
command:
124-
- /bin/uname
125-
- -a
126-
onError: Continue
127-
timeout: 10s
88+
# BackupHook is a list of hooks to execute before and after backing up a resource.
89+
backupHook:
90+
# BackupHook Name. This is the name of the hook that will be executed during backup.
91+
# compulsory
92+
- name: hook1
93+
# Namespaces where this hook will be executed.
94+
includedNamespaces:
95+
- hrweb
96+
excludedNamespaces:
97+
labelSelector:
98+
# PreHooks is a list of BackupResourceHooks to execute prior to backing up an item.
99+
preHooks:
100+
- exec:
101+
# Container is the container in the pod where the command should be executed.
102+
container: webcontainer
103+
# Command is the command and arguments to execute.
104+
command:
105+
- /bin/uname
106+
- -a
107+
# OnError specifies how Velero should behave if it encounters an error executing this hook
108+
onError: Continue
109+
# Timeout is the amount of time to wait for the hook to complete before considering it failed.
110+
timeout: 10s
111+
- exec:
112+
command:
113+
- /bin/bash
114+
- -c
115+
- echo hello > hello.txt && echo goodbye > goodbye.txt
116+
container: webcontainer
117+
onError: Continue
118+
# PostHooks is a list of BackupResourceHooks to execute after backing up an item.
119+
postHooks:
120+
- exec:
121+
container: webcontainer
122+
command:
123+
- /bin/uname
124+
- -a
125+
onError: Continue
126+
timeout: 10s
128127

129128
```
130129

@@ -141,31 +140,31 @@ metadata:
141140
name: restorehookname0
142141
namespace: default
143142
spec:
144-
# Name is the name of this hook.
145-
name: myhook-1
146-
# Restored Namespaces where this hook will be executed.
147-
includedNamespaces:
148-
excludedNamespaces:
149-
labelSelector:
150-
# PostHooks is a list of RestoreResourceHooks to execute during and after restoring a resource.
151-
postHooks:
152-
- exec:
153-
# Container is the container in the pod where the command should be executed.
154-
container: webcontainer
155-
# Command is the command and arguments to execute from within a container after a pod has been restored.
156-
command:
157-
- /bin/bash
158-
- -c
159-
- echo hello > hello.txt && echo goodbye > goodbye.txt
160-
# OnError specifies how Velero should behave if it encounters an error executing this hook
161-
# default value is Continue
162-
onError: Continue
163-
# Timeout is the amount of time to wait for the hook to complete before considering it failed.
164-
execTimeout: 30s
165-
# WaitTimeout defines the maximum amount of time Velero should wait for the container to be ready before attempting to run the command.
166-
waitTimeout: 5m
167-
168-
143+
# RestoreHook is a list of hooks to execute after restoring a resource.
144+
restoreHook:
145+
# Name is the name of this hook.
146+
- name: myhook-1
147+
# Restored Namespaces where this hook will be executed.
148+
includedNamespaces:
149+
excludedNamespaces:
150+
labelSelector:
151+
# PostHooks is a list of RestoreResourceHooks to execute during and after restoring a resource.
152+
postHooks:
153+
- exec:
154+
# Container is the container in the pod where the command should be executed.
155+
container: webcontainer
156+
# Command is the command and arguments to execute from within a container after a pod has been restored.
157+
command:
158+
- /bin/bash
159+
- -c
160+
- echo hello > hello.txt && echo goodbye > goodbye.txt
161+
# OnError specifies how Velero should behave if it encounters an error executing this hook
162+
# default value is Continue
163+
onError: Continue
164+
# Timeout is the amount of time to wait for the hook to complete before considering it failed.
165+
execTimeout: 30s
166+
# WaitTimeout defines the maximum amount of time Velero should wait for the container to be ready before attempting to run the command.
167+
waitTimeout: 5m
169168

170169
```
171170

0 commit comments

Comments
 (0)