kubectl -n test create secret generic pay-key-alipay --from-file=./zfb/1.crt --from-file=./zfb/2.crt --from-file=./zfb/3.crt
kubectl -n test create secret generic pay-key-wechatpay --from-file=./wx/4.p12
usage
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
k8s.kuboard.cn/name: test-service
name: test-service
name: test-service
namespace: test
spec:
replicas: 3
selector:
matchLabels:
name: test-service
template:
metadata:
labels:
name: test-service
name: test-service
spec:
containers:
- image: 'test:6'
imagePullPolicy: IfNotPresent
name: test-service
ports:
- containerPort: 8080
name: http
protocol: TCP
- containerPort: 9999
name: tcp
protocol: TCP
volumeMounts:
- mountPath: /opt/pay/alipay
name: pay-key-alipay
readOnly: true
- mountPath: /opt/pay/wechatpay
name: pay-key-wechatpay
readOnly: true
imagePullSecrets:
- name: dockersecret-test
volumes:
- name: pay-key-alipay
secret:
defaultMode: 420
secretName: pay-key-alipay
- name: pay-key-wechatpay
secret:
defaultMode: 420
secretName: pay-key-wechatpay