Managed Kubernetes
Latest
Frequently Asked Questions
Solutions
How Tos
Internal Only
Templates
Powered By

Title
Message
Create new category
What is the title of your new category?
Edit page index title
What is the title of the page index?
Edit category
What is the new title of your category?
Edit link
What is the new title and URL of your link?
How To Enable/Disable ETCD Backup Using Qbert API
Copy Markdown
Open in ChatGPT
Open in Claude
Problem
You would like to enable/disable ETCD backup on an existing cluster using Qbert API.
Environment
- Platform9 Managed Kubernetes - All versions
- Qbert
- ETCD
Procedure
- Obtain a token for authentication purposes. Keystone Identity API: This link describes the process for getting a Keystone authentication token in order to access the PMK REST APIs.
Command
xxxxxxxxxxTOK=$(openstack token issue -f value -c id)- Run the following command to query the current ETCD Backup configuration.
Bash
curl -skX GET https://<DU_FQDN>/qbert/v4/<projectID>/clusters/<clusterUUID> --header "X-Auth-Token: $TOK" | jq .etcdBackupSample output
xxxxxxxxxx{ "isEtcdBackupEnabled": 0, "intervalInMins": 0, "storageType": "", "storageProperties": null, "taskStatus": "", "taskErrorDetail": ""}- Configure the ETCD Backup by running the following command.
Bash
curl -skX PUT -i https://<DU_FQDN>/qbert/v4/<projectID>/clusters/<clusterUUID> --header "X-Auth-Token: $TOK" --header "Content-Type: application/json" --data '{"etcdBackup": {"isEtcdBackupEnabled": "1", "intervalInMins": "1440", "storageType": "local", "storageProperties": {"localPath": "/etc/pf9/etcd-backup"}}}'Sample Output
xxxxxxxxxxHTTP/1.1 200 OKServer: nginx/1.18.0Date: Thu, 08 Jul 2021 01:21:32 GMTContent-Type: text/plain; charset=utf-8Content-Length: 2Access-Control-Allow-Credentials: trueAccess-Control-Expose-Headers: X-Subject-TokenX-Frame-Options: DENYX-XSS-Protection: 1X-Content-Type-Options: nosniffStrict-Transport-Security: max-age=3600Sample Output
xxxxxxxxxx# kubectl get cronjob -n kube-systemNAME SCHEDULE SUSPEND ACTIVE LAST SCHEDULE AGEetcd-backup */1440 * * * * False 0 <none> 16sPlease configure the intervalInMins, storageType, and localPath properties as per your requirement.
- Validate if the ETCD Backup properties were updated in the Qbert DB.
Bash
curl -skX GET https://<DU_FQDN>/qbert/v4/<projectID>/clusters/<clusterUUID> --header "X-Auth-Token: $TOK" | jq .etcdBackupSample output
xxxxxxxxxx{ "isEtcdBackupEnabled": 1, "intervalInMins": 1440, "storageType": "local", "storageProperties": { "localPath": "/etc/pf9/etcd-backup" }, "taskStatus": "success", "taskErrorDetail": ""}ETCD backup has been successfully enabled on your cluster.
- Disable the ETCD Backup by running the following command.
Bash
curl -skX PUT -i https://<DU_FQDN>/qbert/v4/<projectID>/clusters/<clusterUUID> --header "X-Auth-Token: $TOK" --header "Content-Type: application/json" --data '{"etcdBackup": {"isEtcdBackupEnabled": "0","intervalInMins": "0", "storageType": "", "storageProperties": {"localPath": ""}}}'- Validate if the ETCD Backup properties were updated in the Qbert DB.
Bash
curl -skX GET https://<DU_FQDN>/qbert/v4/<projectID>/clusters/<clusterUUID> --header "X-Auth-Token: $TOK" | jq .etcdBackupSample Output
xxxxxxxxxx{ "isEtcdBackupEnabled": 0, "intervalInMins": 0, "storageType": "", "storageProperties": { "localPath": "" }, "taskStatus": "success", "taskErrorDetail": ""}Sample Output
xxxxxxxxxx# kubectl get cronjob -n kube-systemNo resources found in kube-system namespace.ETCD backup has been successfully disabled on the cluster.
VariableType to search · ESC to discard
GlossaryType to search · ESC to discard
InsertType to search · ESC to discard
No matches
Last updated on
Was this page helpful?
Discard Changes
Do you want to discard your current changes and overwrite with the template?
Archive Synced Block
Message
Create new Template
What is this template's title?
Delete Template
Message