k8s 实验 helm 创建repo on S3

网友投稿 244 2022-10-27

k8s 实验 helm 创建repo on S3

[root@k7smaster helm]# cat setup-s3-helm-repo.sh #!/bin/bash set -e # create random string RANDOM_STRING=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 8 | tr '[:upper:]' '[:lower:]' | head -n 1) # it's important to set the AWS_REGION if not set. Change the default DEFAULT_REGION="eu-west-1" AWS_REGION="${AWS_REGION:-${DEFAULT_REGION}}" export AWS_REGION # create s3 bucket if [ "$AWS_REGION" == "us-east-1" ] ; then aws s3api create-bucket --bucket helm-${RANDOM_STRING} else aws s3api create-bucket --bucket helm-${RANDOM_STRING} --region $AWS_REGION --create-bucket-configuration LocationConstraint=${AWS_REGION} fi # install helm s3 plugin helm plugin install # initialize s3 bucket helm s3 init s3://helm-${RANDOM_STRING}/charts # add repository to helm helm repo add my-charts s3://helm-${RANDOM_STRING}/charts

版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。

上一篇:DisplayPort转DVI/HDMI信号的接口适配器
下一篇:Java实现经典游戏黄金矿工的示例代码
相关文章

 发表评论

暂时没有评论,来抢沙发吧~