有什么方法可以在将清单.yaml传递给kubectl命令时从varibale/config传递映像版本
示例:
apiVersion: v1
kind: ReplicationController
metadata:
name: nginx
spec:
replicas: 1
selector:
app: nginx
template:
metadata:
name: nginx
labels:
app: nginx
spec:
containers:
- name: nginx
image: nginx:${IMAGE_VERSION}
imagePullPolicy: Always
resources:
limits:
cpu: "1.2"
memory: 100Mi
ports:
- containerPort: 80
Run Code Online (Sandbox Code Playgroud)
用例是启动在kubernetes级别设置的特定映像版本,并且该变量由服务器端的kubernetes本身解析.
谢谢和问候,拉维
kubernetes ×1