Credentials
Credentials are used by Backups and Restores to authenticate with Storages and EventHubs. They refer to sensitive information such as usernames, passwords, and access keys, stored inside Kubernetes Secrets .
Usage
Credentials can be managed using the kubectl
command line tool,
and are available by the name creds
or credentials
.
Example:
Supported Credentials
Kannika Armory supports many different authentication methods for various external systems.
The supported types of Credentials are:
- Amazon Web Services (AWS)
- Microsoft Azure
- Google Cloud Platform (GCP)
- SASL/PLAIN
- SASL/SCRAM
- mTLS
- HTTP Basic
Using Credentials in a Backup
The Credentials can be used on a Backup by referencing it in the .spec.sinkCredentialsFrom
fields and the .spec.sourceCredentialsFrom
fields.
Here is an example of a Backup using Credentials:
In this example:
-
A Backup named
backup
is defined, indicated by the.metadata.name
field. -
The Backup will backup data from an EventHub named
kafka
, specified by the.spec.source
field. -
The Backup references Credentials named
kafka-creds
for the source EventHub, specified by the.spec.sourceCredentialsFrom.credentialsRef.name
field. It will be used to authenticate to thekafka
EventHub. -
The Backup will backup data up to a Storage sink named
s3-storage
, specified by the.spec.sink
field. -
The Backup references Credentials named
aws-creds
, specified by the.spec.sinkCredentialsFrom.credentialsRef.name
field. It will be used to authenticate to thes3-storage
Storage sink.
Using Credentials in a Restore
The Credentials can be used on a Restore by referencing it in the .spec.sourceCredentialsFrom
and .spec.sinkCredentialsFrom
fields.
Here is an example of a Restore using Credentials:
In this example:
-
A Restore named
restore
is defined, indicated by the.metadata.name
field. -
The Restore will restore data from a Storage source named
s3-storage
, specified by the.spec.source
field. -
The Restore references Credentials named
aws-creds
, specified by the.spec.sourceCredentialsFrom.credentialsRef.name
field. This will be used to authenticate to thes3-storage
Storage source. -
The Restore will restore data to an EventHub sink named
kafka
, specified by the.spec.sink
field. -
The Restore references Credentials named
kafka-creds
, specified by the.spec.sinkCredentialsFrom.credentialsRef.name
field. This will be used to authenticate to thekafka
EventHub sink.
Using Credentials with an EventHub
Authenticating to EventHubs is also handled by Credentials. Here is an example on how to use the SASL/SCRAM authentication scheme with a Kafka cluster.
For more information, please head towards the EventHub section.
Using Credentials with Storage
Authenticating to Storage is also handled by Credentials.
Here is an example on how to use the AWS authentication scheme with an S3 bucket.
Configuring a description
It is possible to add a description for each type of Credentials resource. This can be useful to document the purpose of the credentials.
To add a description,
set the .spec.sasl.description
field: