full_container_scheme/3.kubernetes/secret/1.sh

26 lines
778 B
Bash

#!/bin/bash
###
# @Author: Logan.Li
# @Gitee: https://gitee.com/attacker
# @email: admin@attacker.club
# @Date: 2025-03-12 20:26:34
# @LastEditTime: 2025-03-12 20:52:14
# @Description:
###
# 输出为单行,避免多余的换行符影响编码
cat /opt/www/pokerapi/storage/app/secret/private_key.pem | base64 -w 0
# 挂载到指定容器
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
imagePullPolicy: IfNotPresent
volumeMounts:
- name: private-key-volume
mountPath: /opt/www/pokerapi/storage/app/secret/private_key.pem
subPath: private_key.pem
volumes:
- name: private-key-volume
secret:
secretName: private-key-secret