创建Deployment
apiVersion: apps/v1
kind: Deployment
metadata:
name: acme-sh-deployment
labels:
app: acme-sh
spec:
replicas: 1
selector:
matchLabels:
app: acme-sh
template:
metadata:
labels:
app: acme-sh
spec:
volumes:
- name: acme-sh # 将配置文件和生成的证书挂载到宿主机
hostPath:
path: /data/
创建Deployment
apiVersion: apps/v1
kind: Deployment
metadata:
name: ghost-deployment
labels:
app: ghost
spec:
replicas: 1
selector:
matchLabels:
app: ghost
template:
metadata:
labels:
app: ghost
spec:
volumes:
- name: tz
hostPath:
path: /etc/localtime
环境变量中增加 MallocNanoZone=0 即可
kubectl logs <pod> -n <namespace> --previous=true
环境:Centos7 + Jenkins + go1.16
问题1: mission $GOPATH
我在Jenkins中使用go的插件(可以自动下载特定版本),但是不知道为什么使用1.16版本是报mission $GOPATH的错误,但是1.15不报,并且1.15也没有设置GOPATH。
经排查后发现这个服务器的jenkins用户环境变量中没有HOME这个环境变量。如果不配置GOPATH时,GOPATH默认为~/go。
估计是1.16以后用户HOME查找目录,1.15及以前用其它方式查找。
为了不重启服务器,在jenkins的Configure System中增加了这个环境变量。
问题2: unrecognized relocation (0x2a) in