当前位置: 首页 > news >正文

自动优化网站软件没有了门户网站等保二级建设方案

自动优化网站软件没有了,门户网站等保二级建设方案,wordpress好看的页面跳转,免费中文网站模板下载GKE是 Google Cloud Platform 提供的托管 Kubernetes 服务#xff0c;允许用户在 Google 的基础设施上部署、管理和扩展容器。本文介绍如何部署一个简单的springboot项目到GKE. 本文使用podman. 如果你用的是docker, 只需要把本文中所有命令中的podman替换成docker即可 非H…GKE是 Google Cloud Platform 提供的托管 Kubernetes 服务允许用户在 Google 的基础设施上部署、管理和扩展容器。本文介绍如何部署一个简单的springboot项目到GKE. 本文使用podman. 如果你用的是docker, 只需要把本文中所有命令中的podman替换成docker即可 非Helm部署方式 准备工作: 在springboot项目路径下,新增3个文件:deployment.yaml,service.yaml,Dockerfile: 结构如下: deployment.yaml, 注意文件里的image地址由后续podman push image gcr.io后得到 apiVersion: apps/v1 kind: Deployment metadata:name: springboot-app spec:replicas: 1selector:matchLabels:app: springboot-apptemplate:metadata:labels:app: springboot-appspec:containers:- name: springboot-appimage: gcr.io/xxxx/yyyy/springboot-appsha256:3725a57f9cd0b6fb63eb91e49c2305a6b684abd129f3f075838a80b54472455cports:- containerPort: 8080service.yaml apiVersion: v1 kind: Service metadata:name: springboot-app-service spec:type: LoadBalancerselector:app: springboot-appports:- protocol: TCPport: 80targetPort: 8080Dockerfile # 使用Amazon Corretto 17作为构建环境 FROM amazoncorretto:17 as build WORKDIR /workspace/app# 复制Maven Wrapper和其他构建文件 COPY mvnw . COPY .mvn .mvn COPY pom.xml . COPY src src# 使用Maven Wrapper进行构建跳过测试 RUN ./mvnw install -DskipTests# 使用Amazon Corretto 17作为生产环境 FROM amazoncorretto:17 VOLUME /tmp ARG JAR_FILE/workspace/app/target/*.jar COPY --frombuild ${JAR_FILE} app.jar ENTRYPOINT [java,-jar,/app.jar]podman build -t gcr.io/xxxx/yyyy/springboot-app:v1 . podman push gcr.io/xxxx/yyyy/springboot-app:v1 会生成如下路径 kubectl apply -f deployment.yaml -n infra --使用这个命令之前先修改一下image的地址。 kubectl apply -f service.yaml -n infra ok啦此时你应该可以访问你的应用了。 Helm部署方式 a. helm create spacex-chart -n infra 生成的chart目录结构如下: 关于values的优先级: 命令行参数或自定义 values.yaml 集群中存储的值 Chart 的默认 values.yaml 可以用这个命令查看生成的k8s组件是否符合你的预期。 helm template spacex-chart ./spacex-chart --values./spacex-chart/values.yaml generated_boot.yamlb. 修改一些文件修改过的文件如下: 另外还移除了service-account等一些不必要的文件 values.yaml # Default values for spacex-chart. # This is a YAML-formatted file. # Declare variables to be passed into your templates.replicaCount: 1image:repository: gcr.io/ebay-mag/kubein/springboot-apppullPolicy: IfNotPresent# Overrides the image tag whose default is the chart appVersion.tag: v1.1imagePullSecrets: [] nameOverride: fullnameOverride: service:type: LoadBalancerport: 80targetPort: 8080ingress:enabled: falseclassName: annotations: {}# kubernetes.io/ingress.class: nginx# kubernetes.io/tls-acme: truehosts:- host: chart-example.localpaths:- path: /pathType: ImplementationSpecifictls: []# - secretName: chart-example-tls# hosts:# - chart-example.localresources: {}# We usually recommend not to specify default resources and to leave this as a conscious# choice for the user. This also increases chances charts run on environments with little# resources, such as Minikube. If you do want to specify resources, uncomment the following# lines, adjust them as necessary, and remove the curly braces after resources:.# limits:# cpu: 100m# memory: 128Mi# requests:# cpu: 100m# memory: 128Miautoscaling:enabled: falseminReplicas: 1maxReplicas: 2targetCPUUtilizationPercentage: 80# targetMemoryUtilizationPercentage: 80nodeSelector: {}tolerations: []affinity: {}deployment.yaml apiVersion: apps/v1 kind: Deployment metadata:name: {{ include spacex-chart.fullname . }}labels:{{- include spacex-chart.labels . | nindent 4 }} spec:{{- if not .Values.autoscaling.enabled }}replicas: {{ .Values.replicaCount }}{{- end }}selector:matchLabels:{{- include spacex-chart.selectorLabels . | nindent 6 }}template:metadata:{{- with .Values.podAnnotations }}annotations:{{- toYaml . | nindent 8 }}{{- end }}labels:{{- include spacex-chart.selectorLabels . | nindent 8 }}spec:{{- with .Values.imagePullSecrets }}imagePullSecrets:{{- toYaml . | nindent 8 }}{{- end }}securityContext:{{- toYaml .Values.podSecurityContext | nindent 8 }}containers:- name: {{ .Chart.Name }}securityContext:{{- toYaml .Values.securityContext | nindent 12 }}image: {{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}imagePullPolicy: {{ .Values.image.pullPolicy }}ports:- name: httpcontainerPort: 80protocol: TCPresources:{{- toYaml .Values.resources | nindent 12 }}{{- with .Values.nodeSelector }}nodeSelector:{{- toYaml . | nindent 8 }}{{- end }}{{- with .Values.affinity }}affinity:{{- toYaml . | nindent 8 }}{{- end }}{{- with .Values.tolerations }}tolerations:{{- toYaml . | nindent 8 }}{{- end }}service.yaml apiVersion: v1 kind: Service metadata:name: {{ include spacex-chart.fullname . }}labels:{{- include spacex-chart.labels . | nindent 4 }} spec:type: {{ .Values.service.type }}ports:- port: {{ .Values.service.port }}targetPort: {{ .Values.service.targetPort }}protocol: TCPname: httpselector:{{- include spacex-chart.selectorLabels . | nindent 4 }}c. 安装 helm install boot-chart-release-001 spacex-chart -n infra 命令解释 helm install [release-name] [chart-name] -n infra此时我们用helm ls可以查看安装chart后的一些对应关系 ok, 此时应用已经部署到GKE中了你可以通过ip访问你的应用了。Happy Helming! 安装完后如果发现需要修改values.yaml里面的值.在修改完values.yaml文件后用如下命令更新。 helm upgrade boot-chart-release-001 spacex-chart -f spacex-chart/values.yaml -n infra 查看更新后的值 helm get values boot-chart-release-001 -n infra
http://www.huolong8.cn/news/111576/

相关文章:

  • 精仿腾讯3366小游戏门户网站源码织梦最新内核带全部数据!html手机网站模板下载
  • 建设银行的官方网站网站建设注意内容
  • 网站分类 维护网络建设与维护是什么工作
  • 网站制作价格多少钱岳麓区专业的建设网站公司
  • 做网站发布wordpress tag超链接
  • wordpress正文新乡网站关键字优化
  • 江西网站备案流程哈尔滨网站建设一薇ls15227
  • 找网站建设需要问什么大连网站建设具体流程是什么
  • 网站备案有必要吗做外贸的有哪些网站
  • 外贸网站建设和网站推广要怎么做行政审批网站开发文档
  • 个人如何建网站网站首页的图标是怎么做的
  • 网站建设行业标准淄博网站制作形象
  • 网站的建设初步定位2021发生的重大新闻5条
  • 研发网站要多长时间旅游网站后台模板
  • 网站开发工程师成都模板建站代理
  • 百事企业的网站建设类型注册公司费用会计分录
  • 给我一个用c 做的网站网站用的服务器
  • 一般做网站多少钱小程序源码怎么使用的
  • 网站建设需要实现哪些目标门店管理系统软件排行
  • 网吧手机网站模版登录腾讯邮箱企业邮箱入口
  • 网站怎样做自适应分辨率大小phpcms 还有人用吗
  • 海外社交网站开发网页版微信二维码怎么弄
  • 做服装团购有哪些网站北京建设官方网站
  • 做网站建设业务员好吗扬中网络推广
  • 深圳网站建设选哪家宁波网站建设地址
  • 重庆渝中区企业网站建设哪家专业wordpress邮箱评论
  • 长沙专业做网站小程序定制程序
  • 网站建设 套餐合肥企业网站制作方案
  • 阿里云企业网站建设教程网页制作公司代码
  • 免费自助建站系统有哪些什么网站可以做告白的网页