+++ /dev/null
-# Copyright 2020 Huawei Technologies Co., Ltd.
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
----
-apiVersion: apps/v1
-kind: Deployment
-metadata:
- name: backup-be
-spec:
- replicas: 1
- selector:
- matchLabels:
- app: backup
- template:
- metadata:
- labels:
- app: backup
- spec:
- volumes:
- - name: task-pv-storage
- persistentVolumeClaim:
- claimName: task-pv-claim
- containers:
- - name: backup-be
- image: ealtedge/robo-be
- env:
- - name: KUBE_CONFIG
- value: "/usr/app/.kube/config"
- - name: HOSTIP
- value: "10.10.0.54"
-
- ports:
- - containerPort: 8091
- volumeMounts:
- - name: task-pv-storage
- mountPath: "/usr/app/.kube/"
-
-# PV with host path of kubeconfig in VM
----
-apiVersion: v1
-kind: PersistentVolume
-metadata:
- name: task-pv-volume
- labels:
- type: local
-spec:
- storageClassName: manual
- capacity:
- storage: 1Gi
- accessModes:
- - ReadWriteOnce
- hostPath:
- path: "/root/.kube/"
-
-# pvc
----
-apiVersion: v1
-kind: PersistentVolumeClaim
-metadata:
- name: task-pv-claim
-spec:
- storageClassName: manual
- accessModes:
- - ReadWriteOnce
- resources:
- requests:
- storage: 1Gi
-
-# backup-be serice
----
-apiVersion: v1
-kind: Service
-metadata:
- name: backup-be
-spec:
- selector:
- app: backup
- type: NodePort
- ports:
- - port: 8091
- name: service-port
- nodePort: 30091