小編給大家分享一下go-admin如何部署到istio平臺,希望大家閱讀完這篇文章之后都有所收獲,下面讓我們一起去探討吧!
專注于為中小企業(yè)提供成都網站設計、網站制作服務,電腦端+手機端+微信端的三站合一,更高效的管理,為中小企業(yè)樂業(yè)免費做網站提供優(yōu)質的服務。我們立足成都,凝聚了一批互聯(lián)網行業(yè)人才,有力地推動了上1000家企業(yè)的穩(wěn)健成長,幫助中小企業(yè)通過網站建設實現(xiàn)規(guī)模擴充和轉變。
kubectl create namespace go-admin kubectl label namespace go-admin istio-injection=enabled
kubectl create configmap settings-admin --from-file=config/settings.yml -n go-admin
kubectl apply -f storage.yml -n go-admin#storage.yml--- apiVersion: v1 kind: PersistentVolumeClaim metadata: name: go-admin namespace: go-admin spec: accessModes: - ReadWriteMany resources: requests: storage: "1Mi" volumeName: storageClassName: nfs-csi
kubectl apply -f deploy.yml -n go-admin# deploy.yml--- apiVersion: v1 kind: Service metadata: name: go-admin namespace: go-admin labels: app: go-admin service: go-admin spec: ports: - port: 8000 name: http protocol: TCP selector: app: go-admin --- apiVersion: apps/v1 kind: Deployment metadata: name: go-admin-v1 namespace: go-admin labels: app: go-admin version: v1 spec: replicas: 1 selector: matchLabels: app: go-admin version: v1 template: metadata: labels: app: go-admin version: v1 spec: containers: - name: go-admin image: registry.cn-shanghai.aliyuncs.com/go-admin-team/go-admin:v1.2.2 imagePullPolicy: IfNotPresent ports: - containerPort: 8000 volumeMounts: - name: go-admin mountPath: /temp - name: go-admin mountPath: /static - name: go-admin-config mountPath: /config/ readOnly: true volumes: - name: go-admin persistentVolumeClaim: claimName: go-admin - name: go-admin-config configMap: name: settings-admin ---
kubectl create configmap nginx-frontend --from-file=default.conf -n go-admin#default.confserver { listen 80; listen [::]:80; server_name localhost; #charset koi8-r; #access_log /var/log/nginx/host.access.log main; location / { root /usr/share/nginx/html; index index.html index.htm; }}
kubectl apply -f deploy.yml# deploy.yml--- apiVersion: v1 kind: Service metadata: name: go-admin-ui namespace: go-admin labels: app: go-admin-ui service: go-admim-ui spec: ports: - port: 80 name: http protocol: TCP selector: app: go-admin-ui --- apiVersion: apps/v1 kind: Deployment metadata: name: go-admin-ui-v1 namespace: go-admin labels: app: go-admin-ui version: v1 spec: replicas: 1 selector: matchLabels: app: go-admin-ui version: v1 template: metadata: labels: app: go-admin-ui version: v1 spec: containers: - name: go-admin-ui image: registry.cn-shanghai.aliyuncs.com/go-admin-team/go-admin-ui:v1.2.2 imagePullPolicy: IfNotPresent ports: - containerPort: 80 volumeMounts: - name: frontendconf mountPath: /etc/nginx/conf.d/default.conf subPath: default.conf readOnly: true volumes: - name: frontendconf configMap: name: nginx-frontend ---
kubectl apply -f destination-go-admin.yaml -n go-admin#destination-go-admin.yamlapiVersion: networking.istio.io/v1alpha3 kind: DestinationRule metadata: name: go-admin-ui namespace: go-admin spec: host: go-admin-ui subsets: - name: v1 labels: version: v1 --- apiVersion: networking.istio.io/v1alpha3 kind: DestinationRule metadata: name: go-admin namespace: go-admin spec: host: go-admin subsets: - name: v1 labels: version: v1
kubectl apply -f go-admin-gateway.yml -n go-admin#go-admin-gateway.yml--- apiVersion: networking.istio.io/v1alpha3 kind: Gateway metadata: name: go-admin-gateway namespace: go-admin spec: selector: istio: ingressgateway # use istio default controller servers: - port: number: 80 name: http protocol: HTTP hosts: - "go-admin.xxxxxx.com"--- apiVersion: networking.istio.io/v1alpha3 kind: VirtualService metadata: name: go-admin-ui namespace: go-admin spec: hosts: - "*" gateways: - go-admin-gateway http: - match: - uri: prefix: /api - uri: prefix: /login route: - destination: host: go-admin subset: v1 port: number: 8000 - match: - uri: prefix: / route: - destination: host: go-admin-ui subset: v1 port: number: 80
看完了這篇文章,相信你對“go-admin如何部署到istio平臺”有了一定的了解,如果想了解更多相關知識,歡迎關注創(chuàng)新互聯(lián)行業(yè)資訊頻道,感謝各位的閱讀!
新聞標題:go-admin如何部署到istio平臺
文章位置:http://aaarwkj.com/article12/gppgdc.html
成都網站建設公司_創(chuàng)新互聯(lián),為您提供營銷型網站建設、網站設計、App設計、App開發(fā)、做網站、
聲明:本網站發(fā)布的內容(圖片、視頻和文字)以用戶投稿、用戶轉載內容為主,如果涉及侵權請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內容未經允許不得轉載,或轉載時需注明來源: 創(chuàng)新互聯(lián)