I'm trying to setup the s3 plugin but I have an issue.
I don't how to format the secret for aws credentials for the operator.
Actually I tried that (with terraform):
resource "kubernetes_secret" "aws_credentials_datawarehouse" {
type = "kubernetes.io/generic"
metadata {
name = "datawarehouse-aws-credentials"
}
data = {
"s3.client.default.access_key" = "....."
"s3.client.default.secret_key" = "....."
}
}
The operator log an error: E1212 13:40:26.641312 1 reflector.go:126] pkg/mod/k8s.io/client-go@v11.0.1-0.20190409021438-1a26190bd76a+incompatible/tools/cache/reflector.go:94: Failed to list *v1beta1.Elasticsearch: v1beta1.ElasticsearchList.Items: []v1beta1.Elasticsearch: v1beta1.Elasticsearch.Spec: v1beta1.ElasticsearchSpec.SecureSettings: []v1beta1.SecretSource: readObjectStart: expect { or n, but found ", error found in #10 byte of ...|ttings":["datawareho|..., bigger context ...|rageClassName":"standard"}}]}],"secureSettings":["datawarehouse-aws-credentials"],"updateStrategy":{|...
I tried to check in the github repository but I'm not sure of which format is expected inside the secret
The error looks more like a bug in the Elasticsearch resource itself.
Can you share your elasticsearch yaml manifest which references the secure settings secrets?
Ok so the elasticsearch cluster take the secure settings but it seems it don't read or don't understand the secure settings.
error: https://gist.github.com/Dudesons/48e30a2b909c3330ec84a2e4c8791089
The payload to create the snapshot:
{
"schedule": "0 0 * * * ?",
"name": "<hourly-snap-{now/d{yyyy.MM.dd.HH}}>",
"repository": "s3_repository",
"config": {
"indices": ["*"]
},
"retention": {
"expire_after": "30d",
"min_count": 240,
"max_count": 750
}
}
Looking at the error log: http://169.254.169.254/latest/meta-data/iam/security-credentials
It looks like the S3 repository plugin is trying to retrieve some metadata from aws metadata server, which does not seem to be accessible from where you're using this plugin?
I'm still wondering whether secure settings are setup correctly. Can you share the content of your Elasticsearch yaml manifest and the content of your secure settings secret (kubectl get secret datawarehouse-aws-credentials -o yaml). Please strip out any secret information from there, including the base64 payload in the secret (we're only interested in the secret keys).
I'm not very familiar with the s3 repository, but by looking around I guess:
either there is a problem with secure settings themselves (wrong value or not set correctly), see Error while creating snapshot to s3 repository
Can you double-check your s3.client.default.access_key and s3.client.default.secret_key are correct? Note their value should be base64-encoded in the Kubernetes secret.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.