衡水淘宝的网站建设宁波公司网站首页优化

张小明 2025/12/31 1:15:44
衡水淘宝的网站建设,宁波公司网站首页优化,腾讯域名注册官网,wordpress迁站到阿里云、创建Prometheus工作区1.创建工作区为了可以把Prometheus数据写入到AWS managed Prometheus#xff0c;需要先在AWS Prometheus控制台中创建工作区image2.保存工作区配置 点击AWS Prometheus工作区ID进入详情#xff0c;将提取/收集 中的配置保存为prometheus.yaml#xff…、创建Prometheus工作区1.创建工作区为了可以把Prometheus数据写入到AWS managed Prometheus需要先在AWS Prometheus控制台中创建工作区image2.保存工作区配置点击AWS Prometheus工作区ID进入详情将提取/收集 中的配置保存为prometheus.yaml后面会在安装prometheus时使用。image3.创建从EKS提取指标的role使用以下内容创建名为 createIRSA-AMPIngest.sh 的文件。将 my_amazon_eks_clustername 替换为您集群的名称并将 my_prometheus_namespace 替换为您的 Prometheus 命名空间复制代码#!/bin/bash -eCLUSTER_NAMEmy_amazon_eks_clusternameSERVICE_ACCOUNT_NAMESPACEmy_prometheus_namespaceAWS_ACCOUNT_ID$(aws sts get-caller-identity --query Account --output text)OIDC_PROVIDER$(aws eks describe-cluster --name $CLUSTER_NAME --query cluster.identity.oidc.issuer --output text | sed -e s/^https:\/\///)SERVICE_ACCOUNT_AMP_INGEST_NAMEamp-iamproxy-ingest-service-accountSERVICE_ACCOUNT_IAM_AMP_INGEST_ROLEamp-iamproxy-ingest-roleSERVICE_ACCOUNT_IAM_AMP_INGEST_POLICYAMPIngestPolicy## Set up a trust policy designed for a specific combination of K8s service account and namespace to sign in from a Kubernetes cluster which hosts the OIDC Idp.#cat EOF TrustPolicy.json{Version: 2012-10-17,Statement: [{Effect: Allow,Principal: {Federated: arn:aws:iam::${AWS_ACCOUNT_ID}:oidc-provider/${OIDC_PROVIDER}},Action: sts:AssumeRoleWithWebIdentity,Condition: {StringEquals: {${OIDC_PROVIDER}:sub: system:serviceaccount:${SERVICE_ACCOUNT_NAMESPACE}:${SERVICE_ACCOUNT_AMP_INGEST_NAME}}}}]}EOF## Set up the permission policy that grants ingest (remote write) permissions for all AMP workspaces#cat EOF PermissionPolicyIngest.json{Version: 2012-10-17,Statement: [{Effect: Allow,Action: [aps:RemoteWrite,aps:GetSeries,aps:GetLabels,aps:GetMetricMetadata],Resource: *}]}EOFfunction getRoleArn() {OUTPUT$(aws iam get-role --role-name $1 --query Role.Arn --output text 21)# Check for an expected exceptionif [[ $? -eq 0 ]]; thenecho $OUTPUTelif [[ -n $(grep NoSuchEntity $OUTPUT) ]]; thenecho else2 echo $OUTPUTreturn 1fi}## Create the IAM Role for ingest with the above trust policy#SERVICE_ACCOUNT_IAM_AMP_INGEST_ROLE_ARN$(getRoleArn $SERVICE_ACCOUNT_IAM_AMP_INGEST_ROLE)if [ $SERVICE_ACCOUNT_IAM_AMP_INGEST_ROLE_ARN ];then## Create the IAM role for service account#SERVICE_ACCOUNT_IAM_AMP_INGEST_ROLE_ARN$(aws iam create-role \--role-name $SERVICE_ACCOUNT_IAM_AMP_INGEST_ROLE \--assume-role-policy-document file://TrustPolicy.json \--query Role.Arn --output text)## Create an IAM permission policy#SERVICE_ACCOUNT_IAM_AMP_INGEST_ARN$(aws iam create-policy --policy-name $SERVICE_ACCOUNT_IAM_AMP_INGEST_POLICY \--policy-document file://PermissionPolicyIngest.json \--query Policy.Arn --output text)## Attach the required IAM policies to the IAM role created above#aws iam attach-role-policy \--role-name $SERVICE_ACCOUNT_IAM_AMP_INGEST_ROLE \--policy-arn $SERVICE_ACCOUNT_IAM_AMP_INGEST_ARNelseecho $SERVICE_ACCOUNT_IAM_AMP_INGEST_ROLE_ARN IAM role for ingest already existsfiecho $SERVICE_ACCOUNT_IAM_AMP_INGEST_ROLE_ARN## EKS cluster hosts an OIDC provider with a public discovery endpoint.# Associate this IdP with AWS IAM so that the latter can validate and accept the OIDC tokens issued by Kubernetes to service accounts.# Doing this with eksctl is the easier and best approach.#eksctl utils associate-iam-oidc-provider --cluster $CLUSTER_NAME --approve复制代码执行以上脚本创建rolebash createIRSA-AMPIngest.sh使用以下内容创建名为 createIRSA-AMPQuery.sh 的文件。将 my_amazon_eks_clustername 替换为集群的名称并将 my_prometheus_namespace 替换为您的 Prometheus 命名空间。复制代码#!/bin/bash -eCLUSTER_NAMEmy_amazon_eks_clusternameSERVICE_ACCOUNT_NAMESPACEmy_prometheus_namespaceAWS_ACCOUNT_ID$(aws sts get-caller-identity --query Account --output text)OIDC_PROVIDER$(aws eks describe-cluster --name $CLUSTER_NAME --query cluster.identity.oidc.issuer --output text | sed -e s/^https:\/\///)SERVICE_ACCOUNT_AMP_QUERY_NAMEamp-iamproxy-query-service-accountSERVICE_ACCOUNT_IAM_AMP_QUERY_ROLEamp-iamproxy-query-roleSERVICE_ACCOUNT_IAM_AMP_QUERY_POLICYAMPQueryPolicy## Setup a trust policy designed for a specific combination of K8s service account and namespace to sign in from a Kubernetes cluster which hosts the OIDC Idp.#cat EOF TrustPolicy.json{Version: 2012-10-17,Statement: [{Effect: Allow,Principal: {Federated: arn:aws:iam::${AWS_ACCOUNT_ID}:oidc-provider/${OIDC_PROVIDER}},Action: sts:AssumeRoleWithWebIdentity,Condition: {StringEquals: {${OIDC_PROVIDER}:sub: system:serviceaccount:${SERVICE_ACCOUNT_NAMESPACE}:${SERVICE_ACCOUNT_AMP_QUERY_NAME}}}}]}EOF## Set up the permission policy that grants query permissions for all AMP workspaces#cat EOF PermissionPolicyQuery.json{Version: 2012-10-17,Statement: [{Effect: Allow,Action: [aps:QueryMetrics,aps:GetSeries,aps:GetLabels,aps:GetMetricMetadata],Resource: *}]}EOFfunction getRoleArn() {OUTPUT$(aws iam get-role --role-name $1 --query Role.Arn --output text 21)# Check for an expected exceptionif [[ $? -eq 0 ]]; thenecho $OUTPUTelif [[ -n $(grep NoSuchEntity $OUTPUT) ]]; thenecho else2 echo $OUTPUTreturn 1fi}## Create the IAM Role for query with the above trust policy#SERVICE_ACCOUNT_IAM_AMP_QUERY_ROLE_ARN$(getRoleArn $SERVICE_ACCOUNT_IAM_AMP_QUERY_ROLE)if [ $SERVICE_ACCOUNT_IAM_AMP_QUERY_ROLE_ARN ];then## Create the IAM role for service account#SERVICE_ACCOUNT_IAM_AMP_QUERY_ROLE_ARN$(aws iam create-role \--role-name $SERVICE_ACCOUNT_IAM_AMP_QUERY_ROLE \--assume-role-policy-document file://TrustPolicy.json \--query Role.Arn --output text)## Create an IAM permission policy#SERVICE_ACCOUNT_IAM_AMP_QUERY_ARN$(aws iam create-policy --policy-name $SERVICE_ACCOUNT_IAM_AMP_QUERY_POLICY \--policy-document file://PermissionPolicyQuery.json \--query Policy.Arn --output text)## Attach the required IAM policies to the IAM role create above#aws iam attach-role-policy \--role-name $SERVICE_ACCOUNT_IAM_AMP_QUERY_ROLE \--policy-arn $SERVICE_ACCOUNT_IAM_AMP_QUERY_ARNelseecho $SERVICE_ACCOUNT_IAM_AMP_QUERY_ROLE_ARN IAM role for query already existsfiecho $SERVICE_ACCOUNT_IAM_AMP_QUERY_ROLE_ARN## EKS cluster hosts an OIDC provider with a public discovery endpoint.# Associate this IdP with AWS IAM so that the latter can validate and accept the OIDC tokens issued by Kubernetes to service accounts.# Doing this with eksctl is the easier and best approach.#eksctl utils associate-iam-oidc-provider --cluster $CLUSTER_NAME --approve复制代码执行以上脚本创建rolebash createIRSA-AMPQuery.sh二、部署Prometheus1.添加helm仓库helm repo add prometheus-community https://prometheus-community.github.io/helm-chartshelm repo add kube-state-metrics https://kubernetes.github.io/kube-state-metricshelm repo update2.创建部署Prometheus的命名空间kubectl create namespace monitoring3.检查Amazon EBS CSI如果EBS CSI组件没有附加对应的IAM role需要在IAM 控制台中创建附有AmazonEBSCSIDriverPolicy权限且类型为AWS账号的role否则EKS创建PVC时会报错image4.创建storageClass复制代码#cat sc.yamlapiVersion: storage.k8s.io/v1kind: StorageClassmetadata:name: ebs-scannotations:storageclass.kubernetes.io/is-default-class: trueprovisioner: ebs.csi.aws.comallowVolumeExpansion: truevolumeBindingMode: WaitForFirstConsumerparameters:type: gp3#kubectl apply -f sc.yaml复制代码5.部署Prometheushelm install prometheus prometheus -n monitoring -f prometheus.yaml6.查看Prometheus是否部署成功kubectl get pods -n monitoring7.部署grafana复制代码#cat grafana.yaml---apiVersion: v1kind: PersistentVolumeClaimmetadata:name: grafana-pvcspec:accessModes:- ReadWriteOnceresources:requests:storage: 1Gi---apiVersion: apps/v1kind: Deploymentmetadata:labels:app: grafananame: grafanaspec:selector:matchLabels:app: grafanatemplate:metadata:labels:app: grafanaspec:securityContext:fsGroup: 472supplementalGroups:- 0containers:- name: grafanaimage: grafana/grafana:latestimagePullPolicy: IfNotPresentports:- containerPort: 3000name: http-grafanaprotocol: TCPreadinessProbe:failureThreshold: 3httpGet:path: /robots.txtport: 3000scheme: HTTPinitialDelaySeconds: 10periodSeconds: 30successThreshold: 1timeoutSeconds: 2livenessProbe:failureThreshold: 3initialDelaySeconds: 30periodSeconds: 10successThreshold: 1tcpSocket:port: 3000timeoutSeconds: 1resources:requests:cpu: 250mmemory: 750MivolumeMounts:- mountPath: /var/lib/grafananame: grafana-pvvolumes:- name: grafana-pvpersistentVolumeClaim:claimName: grafana-pvc---apiVersion: v1kind: Servicemetadata:name: grafanaspec:ports:- port: 3000protocol: TCPtargetPort: http-grafanaselector:app: grafanasessionAffinity: Nonetype: ClusterIP#kubectl apply -f grafana.yaml -n monitoring复制代码三、访问Prometheus和grafanaPrometheus和grafana部署完成以后可以将SVC类型改为nodeport然后通过ALB暴露出来通过公网进行访问grafana默认用户密码为admin/adminimage
版权声明:本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若内容造成侵权/违法违规/事实不符,请联系邮箱:809451989@qq.com进行投诉反馈,一经查实,立即删除!

张家港做网站的推荐wordpress 代码转义

简 介: 本文介绍了在LTspice中格式化.op数据标签的方法。通过使用round函数可以设置显示数据的小数点位数,使仿真结果更加简洁直观。具体操作是右键点击.op数据标签,使用round函数调整小数位数。这种方法能有效优化电路静态偏置量的显示效果&…

张小明 2025/12/29 18:09:35 网站建设

驻马店网站建设费用做网站php软件

PaddlePaddle镜像支持多卡训练吗?实测四张GPU卡并行效率 在AI模型日益庞大的今天,单张GPU早已无法满足工业级训练的算力需求。从BERT到ViT,再到如今动辄上百亿参数的大模型,训练任务对计算资源的渴求呈指数级增长。而在这场效率竞…

张小明 2025/12/29 18:09:00 网站建设

信用卡网站模板电子平台网站

文物修复辅助:TensorFlow图像补全技术 在敦煌莫高窟的一幅唐代壁画前,研究人员正面对着一片因风化而模糊不清的飞天衣袂。传统修复需要数月时间反复比对文献、调配颜料、手工填补,稍有不慎便可能“画蛇添足”。如今,他们只需将高清…

张小明 2025/12/29 18:08:24 网站建设

顺德建设局网站网站导航条用什么做

Windows Azure Blob 存储使用全解析 1. Blob 复制 在云存储中备份 Blob 数据是常见需求。手动下载再上传的方式效率极低,数据需在数据中心和本地来回传输。更好的方法是使用 Windows Azure 的 Blob 复制功能。 操作步骤如下: - 发起一个 PUT 请求来备份 Blob。 - 不包含…

张小明 2025/12/30 20:21:46 网站建设

公司网站制作站制作phpcms适合做什么网站

Typst高级排版技巧:从基础布局到复杂文档的专业解决方案 【免费下载链接】typst A new markup-based typesetting system that is powerful and easy to learn. 项目地址: https://gitcode.com/GitHub_Trending/ty/typst Typst作为新一代标记语言排版系统&am…

张小明 2025/12/29 18:07:09 网站建设

国内外电子政务网站建设差距上海工厂网站建设

FGO智能游戏助手终极指南:快速上手与高效配置方案 【免费下载链接】FGO-Automata 一个FGO脚本和API フェイトグランドオーダー自動化 项目地址: https://gitcode.com/gh_mirrors/fg/FGO-Automata FGO智能游戏助手作为一款革命性的自动化工具,通过…

张小明 2025/12/29 18:06:35 网站建设