Skip to content

Commit 1b16a5f

Browse files
committed
Translated to Spanish the day88 file
Signed-off-by: Manuel Vergara <manuel@vergaracarmona.es>
1 parent 6f6df79 commit 1b16a5f

1 file changed

Lines changed: 66 additions & 60 deletions

File tree

2022/es/Days/day88.md

Lines changed: 66 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -1,62 +1,63 @@
1-
## Application-Focused Backups
1+
## Copias de seguridad enfocadas en aplicaciones
22

3-
We have already spent some time talking about data services or data-intensive applications such as databases on [Day 85](day85.md). For these data services, we have to consider how we manage consistency, especially when it comes to application consistency.
3+
Ya hemos dedicado tiempo a hablar sobre servicios de datos o aplicaciones intensivas en datos, como las bases de datos en [Día 85](day85.md). Para estos servicios de datos, debemos considerar cómo gestionamos la consistencia, especialmente cuando se trata de la consistencia de la aplicación.
44

5-
In this post, we are going to dive into that requirement around consistently protecting the application data.
5+
En esta publicación, profundizaremos en ese requisito de proteger de manera consistente los datos de la aplicación.
66

7-
To do this our tool of choice will be [Kanister](https://kanister.io/)
7+
Para hacer esto, nuestra herramienta elegida será [Kanister](https://kanister.io/).
88

99
![](Images/Day88_Data1.png)
1010

11-
### Introducing Kanister
11+
### Introducción a Kanister
1212

13-
Kanister is an open-source project by Kasten, that enables us to manage (backup and restore) application data on Kubernetes. You can deploy Kanister as a helm application into your Kubernetes cluster.
13+
Kanister es un proyecto de código abierto de Kasten que nos permite gestionar (hacer copias de seguridad y restaurar) los datos de la aplicación en Kubernetes. Puedes implementar Kanister como una aplicación Helm en tu clúster de Kubernetes.
1414

15-
Kanister uses Kubernetes custom resources, the main custom resources that are installed when Kanister is deployed are
15+
Kanister utiliza recursos personalizados de Kubernetes. Los recursos personalizados principales que se instalan al implementar Kanister son:
1616

17-
- `Profile` - is a target location to store your backups and recover from. Most commonly this will be object storage.
18-
- `Blueprint` - steps that are to be taken to backup and restore the database should be maintained in the Blueprint
19-
- `ActionSet` - is the motion to move our target backup to our profile as well as restore actions.
17+
- `Profile` (perfil): es un lugar de destino para almacenar tus copias de seguridad y recuperarlas. Por lo general, esto será un almacenamiento de objetos.
18+
- `Blueprint` (diseño): los pasos que se deben seguir para hacer una copia de seguridad y restaurar la base de datos se deben mantener en el blueprint.
19+
- `ActionSet` (conjunto de acciones): es el movimiento para mover nuestra copia de seguridad objetivo a nuestro perfil, así como las acciones de restauración.
2020

21-
### Execution Walkthrough
21+
### Ejecución paso a paso
2222

23-
Before we get hands-on we should take a look at the workflow that Kanister takes in protecting application data. Firstly our controller is deployed using helm into our Kubernetes cluster, Kanister lives within its namespace. We take our Blueprint of which there are many community-supported blueprints available, we will cover this in more detail shortly. We then have our database workload.
23+
Antes de comenzar, debemos echar un vistazo al flujo de trabajo que Kanister sigue para proteger los datos de la aplicación. En primer lugar, implementamos nuestro controlador mediante Helm en nuestro clúster de Kubernetes. Kanister se ejecuta en su propio espacio de nombres (namespace). A continuación, tomamos nuestro Blueprint, del cual hay muchos blueprints respaldados por la comunidad disponibles. Cubriremos esto en más detalle en breve. Luego, tenemos nuestra carga de trabajo de la base de datos.
2424

2525
![](Images/Day88_Data2.png)
2626

27-
We then create our ActionSet.
27+
A continuación, creamos nuestro ActionSet.
2828

2929
![](Images/Day88_Data3.png)
3030

31-
The ActionSet allows us to run the actions defined in the blueprint against the specific data service.
31+
El ActionSet nos permite ejecutar las acciones definidas en el blueprint contra el servicio de datos específico.
3232

3333
![](Images/Day88_Data4.png)
3434

35-
The ActionSet in turn uses the Kanister functions (KubeExec, KubeTask, Resource Lifecycle) and pushes our backup to our target repository (Profile).
35+
A su vez, el ActionSet utiliza las funciones de Kanister (KubeExec, KubeTask, Resource Lifecycle) y envía nuestra copia de seguridad a nuestro repositorio de destino (Profile).
3636

3737
![](Images/Day88_Data5.png)
3838

39-
If that action is completed/failed the respective status is updated in the Actionset.
39+
Si la acción se completa o falla, el estado respectivo se actualiza en el ActionSet.
4040

4141
![](Images/Day88_Data6.png)
4242

43-
### Deploying Kanister
43+
### Implementación de Kanister
4444

45-
Once again we will be using the minikube cluster to achieve this application backup. If you have it still running from the previous session then we can continue to use this.
45+
Una vez más, utilizaremos el clúster minikube para lograr esta copia de seguridad de la aplicación. Si todavía lo tienes en ejecución desde la sesión anterior, podemos seguir usándolo.
4646

47-
At the time of writing, we are up to image version `0.75.0` with the following helm command we will install kanister into our Kubernetes cluster.
48-
49-
`helm install kanister --namespace kanister kanister/kanister-operator --set image.tag=0.75.0 --create-namespace`
47+
En el momento de escribir esto, estamos en la versión de imagen 0.75.0. Con el siguiente comando de Helm, instalaremos Kanister en nuestro clúster de Kubernetes:
48+
```sh
49+
helm install kanister --namespace kanister kanister/kanister-operator --set image.tag=0.75.0 --create-namespace
50+
```
5051

5152
![](Images/Day88_Data7.png)
5253

53-
We can use `kubectl get pods -n kanister` to ensure the pod is up and running and then we can also check our custom resource definitions are now available (If you have only installed Kanister then you will see the highlighted 3)
54+
Podemos usar kubectl get pods -n kanister para asegurarnos de que el pod esté en funcionamiento y también podemos verificar que las definiciones de recursos personal.
5455

5556
![](Images/Day88_Data8.png)
5657

57-
### Deploy a Database
58+
### Despliegue de una base de datos
5859

59-
Deploying MySQL via helm:
60+
Desplegar MySQL mediante Helm:
6061

6162
```Shell
6263
APP_NAME=my-production-app
@@ -68,7 +69,7 @@ kubectl get pods -n ${APP_NAME} -w
6869

6970
![](Images/Day88_Data9.png)
7071

71-
Populate the MySQL database with initial data, and run the following:
72+
Rellenar la base de datos de MySQL con datos iniciales y ejecutar lo siguiente:
7273

7374
```Shell
7475
MYSQL_ROOT_PASSWORD=$(kubectl get secret --namespace ${APP_NAME} mysql-store -o jsonpath="{.data.mysql-root-password}" | base64 --decode)
@@ -77,9 +78,9 @@ MYSQL_EXEC="mysql -h ${MYSQL_HOST} -u root --password=${MYSQL_ROOT_PASSWORD} -Dm
7778
echo MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
7879
```
7980

80-
### Create a MySQL CLIENT
81+
### Crear un CLIENTE de MySQL
8182

82-
We will run another container image to act as our client
83+
Ejecutaremos otra imagen de contenedor para actuar como nuestro cliente:
8384

8485
```Shell
8586
APP_NAME=my-production-app
@@ -92,7 +93,7 @@ Note: if you already have an existing MySQL client pod running, delete with the
9293
kubectl delete pod -n ${APP_NAME} mysql-client
9394
```
9495
95-
### Add Data to MySQL
96+
### Agregar datos a MySQL
9697
9798
```Shell
9899
echo "create database myImportantData;" | mysql -h ${MYSQL_HOST} -u root --password=${MYSQL_ROOT_PASSWORD}
@@ -111,27 +112,28 @@ echo "select * from Accounts;" | ${MYSQL_EXEC}
111112
exit
112113
```
113114
114-
You should be able to see some data as per below.
115+
Deberías poder ver algunos datos como se muestra a continuación.
115116
116117
![](Images/Day88_Data10.png)
117118
118-
### Create Kanister Profile
119+
### Crear perfil Kanister
119120
120-
Kanister provides a CLI, `kanctl` and another utility `kando` that is used to interact with your object storage provider from the blueprint and both of these utilities.
121+
Kanister proporciona una CLI, `kanctl`, y otra utilidad, `kando`, que se utiliza para interactuar con tu proveedor de almacenamiento de objetos desde el blueprint y ambas utilidades.
121122
122-
[CLI Download](https://docs.kanister.io/tooling.html#tooling)
123+
[Descarga de la CLI](https://docs.kanister.io/tooling.html#tooling)
123124
124-
I have gone and I have created an AWS S3 Bucket that we will use as our profile target and restore location. I am going to be using environment variables so that I can still show you the commands I am running with `kanctl` to create our kanister profile.
125-
126-
`kanctl create profile s3compliant --access-key $ACCESS_KEY --secret-key $SECRET_KEY --bucket $BUCKET --region eu-west-2 --namespace my-production-app`
125+
He creado un bucket de AWS S3 que utilizaremos como destino de nuestro perfil y ubicación de restauración. Voy a utilizar variables de entorno para mostrar los comandos que ejecuto con kanctl para crear nuestro perfil Kanister.
126+
```sh
127+
kanctl create profile s3compliant --access-key $ACCESS_KEY --secret-key $SECRET_KEY --bucket $BUCKET --region eu-west-2 --namespace my-production-app
128+
```
127129
128130
![](Images/Day88_Data11.png)
129131
130-
### Blueprint time
132+
### Blueprint
131133
132-
Don't worry you don't need to create your one from scratch unless your data service is not listed here in the [Kanister Examples](https://github.com/kanisterio/kanister/tree/master/examples) but by all means, community contributions are how this project gains awareness.
134+
No te preocupes, no necesitas crear uno desde cero a menos que tu servicio de datos no esté listado aquí en los [Ejemplos de Kanister](https://github.com/kanisterio/kanister/tree/master/examples), pero, por supuesto, las contribuciones de la comunidad son la forma en que este proyecto gana visibilidad.
133135
134-
The blueprint we will be using will be the below.
136+
El blueprint que utilizaremos será el siguiente:
135137
136138
```Shell
137139
apiVersion: cr.kanister.io/v1alpha1
@@ -213,67 +215,71 @@ actions:
213215
kando location delete --profile '{{ toJson .Profile }}' --path ${s3_path}
214216
```
215217
216-
To add this we will use the `kubectl create -f mysql-blueprint.yml -n kanister` command
218+
Para agregar esto, utilizaremos el comando `kubectl create -f mysql-blueprint.yml -n kanister`.
217219
218220
![](Images/Day88_Data12.png)
219221
220-
### Create our ActionSet and Protect our application
222+
### Crear nuestro ActionSet y proteger nuestra aplicación
221223
222-
We will now take a backup of the MySQL data using an ActionSet defining backup for this application. Create an ActionSet in the same namespace as the controller.
223-
224-
`kubectl get profiles.cr.kanister.io -n my-production-app` This command will show us the profile we previously created, we can have multiple profiles configured here so we might want to use specific ones for different ActionSets
224+
Ahora realizaremos una copia de seguridad de los datos de MySQL utilizando un ActionSet que define la copia de seguridad para esta aplicación. Crea un ActionSet en el mismo namespace que el controlador.
225+
```sh
226+
kubectl get profiles.cr.kanister.io -n my-production-app
227+
```
225228
226-
We are then going to create our ActionSet with the following command using `kanctl`
229+
Este comando nos mostrará el perfil que creamos anteriormente. Podemos tener múltiples perfiles configurados aquí, por lo que podemos usar perfiles específicos para diferentes ActionSets.
227230
228-
`kanctl create actionset --action backup --namespace kanister --blueprint mysql-blueprint --statefulset my-production-app/mysql-store --profile my-production-app/s3-profile-dc5zm --secrets mysql=my-production-app/mysql-store`
231+
Luego, crearemos nuestro ActionSet con el siguiente comando utilizando `kanctl`:
232+
```sh
233+
kanctl create actionset --action backup --namespace kanister --blueprint mysql-blueprint --statefulset my-production-app/mysql-store --profile my-production-app/s3-profile-dc5zm --secrets mysql=my-production-app/mysql-store
234+
```
229235
230-
You can see from the command above we are defining the blueprint we added to the namespace, the statefulset in our `my-production-app` namespace and also the secrets to get into the MySQL application.
236+
En el comando anterior, estamos definiendo el blueprint que agregamos al namespace, el statefulset en nuestro namespace `my-production-app` y también los secretos para acceder a la aplicación MySQL.
231237
232238
![](Images/Day88_Data13.png)
233239
234-
Check the status of the ActionSet by taking the ActionSet name and using this command `kubectl --namespace kanister describe actionset backup-qpnqv`
240+
Verifica el estado del ActionSet utilizando el nombre del ActionSet con el siguiente comando: kubectl --namespace kanister describe actionset backup-qpnqv.
235241
236-
Finally, we can go and confirm that we now have data in our AWS S3 bucket.
242+
Finalmente, podemos confirmar que ahora tenemos datos en nuestro bucket de AWS S3.
237243
238244
![](Images/Day88_Data14.png)
239245
240-
### Restore
246+
### Restauración
241247
242-
We need to cause some damage before we can restore anything, we can do this by dropping our table, maybe it was an accident, maybe it wasn't.
248+
Necesitamos causar algún daño antes de poder restaurar algo, podemos hacer esto eliminando nuestra tabla, tal vez fue un accidente, tal vez no lo fue.
243249
244-
Connect to our MySQL pod.
250+
Conéctate a nuestro pod de MySQL.
245251
246252
```Shell
247253
APP_NAME=my-production-app
248254
kubectl run mysql-client --rm --env APP_NS=${APP_NAME} --env MYSQL_EXEC="${MYSQL_EXEC}" --env MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD} --env MYSQL_HOST=${MYSQL_HOST} --namespace ${APP_NAME} --tty -i --restart='Never' --image docker.io/bitnami/mysql:latest --command -- bash
249255
```
250256
251-
You can see that our importantdata DB is there with `echo "SHOW DATABASES;" | ${MYSQL_EXEC}`
257+
Puedes ver que nuestra base de datos importantdata está ahí con `echo "SHOW DATABASES;" | ${MYSQL_EXEC}`.
252258
253-
Then to drop we ran `echo "DROP DATABASE myImportantData;" | ${MYSQL_EXEC}`
259+
Luego, para eliminarla, ejecutamos `echo "DROP DATABASE myImportantData;" | ${MYSQL_EXEC}`.
254260
255-
And confirmed that this was gone with a few attempts to show our database.
261+
Y confirmamos que se haya eliminado con algunos intentos de mostrar nuestra base de datos.
256262
257263
![](Images/Day88_Data15.png)
258264
259-
We can now use Kanister to get our important data back in business using the `kubectl get actionset -n kanister` to find out the ActionSet name that we took earlier. Then we will create a restore ActionSet to restore our data using `kanctl create actionset -n kanister --action restore --from "backup-qpnqv"`
265+
Ahora podemos usar Kanister para restaurar nuestros datos importantes utilizando el comando `kubectl get actionset -n kanister` para encontrar el nombre del ActionSet que tomamos anteriormente. Luego, crearemos un ActionSet de restauración para restaurar nuestros datos usando `kanctl create actionset -n kanister --action restore --from "backup-qpnqv`".
260266
261267
![](Images/Day88_Data16.png)
262268
263-
We can confirm our data is back by using the below command to connect to our database.
269+
Podemos confirmar que nuestros datos están de vuelta en nuestro pod de MySQL.
264270
265271
```Shell
266272
APP_NAME=my-production-app
267273
kubectl run mysql-client --rm --env APP_NS=${APP_NAME} --env MYSQL_EXEC="${MYSQL_EXEC}" --env MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD} --env MYSQL_HOST=${MYSQL_HOST} --namespace ${APP_NAME} --tty -i --restart='Never' --image docker.io/bitnami/mysql:latest --command -- bash
268274
```
269275
270-
Now we are inside the MySQL Client, we can issue the `echo "SHOW DATABASES;" | ${MYSQL_EXEC}` and we can see the database is back. We can also issue the `echo "select * from Accounts;" | ${MYSQL_EXEC}` to check the contents of the database and our important data is restored.
276+
Ahora estamos dentro del Cliente de MySQL, podemos ejecutar `echo "SHOW DATABASES;" | ${MYSQL_EXEC}` y podemos ver que la base de datos está de vuelta. También podemos ejecutar `echo "select * from Accounts;" | ${MYSQL_EXEC}` para verificar el contenido de la base de datos y nuestros datos importantes están restaurados.
271277
272278
![](Images/Day88_Data17.png)
273279
274-
In the next post, we take a look at Disaster Recovery within Kubernetes.
280+
En la próxima publicación, veremos la Recuperación de Desastres dentro de Kubernetes.
275281
276-
## Resources
282+
## Recursos
277283
278284
- [Kanister Overview - An extensible open-source framework for app-lvl data management on Kubernetes](https://www.youtube.com/watch?v=wFD42Zpbfts)
279285
- [Application Level Data Operations on Kubernetes](https://community.cncf.io/events/details/cncf-cncf-online-programs-presents-cncf-live-webinar-kanister-application-level-data-operations-on-kubernetes/)
@@ -283,4 +289,4 @@ In the next post, we take a look at Disaster Recovery within Kubernetes.
283289
- [Disaster Recovery vs. Backup: What's the difference?](https://www.youtube.com/watch?v=07EHsPuKXc0)
284290
- [Veeam Portability & Cloud Mobility](https://www.youtube.com/watch?v=hDBlTdzE6Us&t=3s)
285291
286-
See you on [Day 89](day89.md)
292+
Nos vemos en el [Día 89](day89.md)

0 commit comments

Comments
 (0)