pilot-agent 双栈 yaml
时间: 2023-06-23 11:54:02 浏览: 50
以下是一个 pilot-agent 双栈的 YAML 示例:
```yaml
apiVersion: v1
kind: ConfigMap
metadata:
name: istio
data:
mesh: |-
enableIPv6: true
---
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: istio-pilot-agent
spec:
selector:
matchLabels:
app: istio-pilot-agent
template:
metadata:
labels:
app: istio-pilot-agent
spec:
containers:
- name: istio-pilot-agent
image: docker.io/istio/pilot-agent:1.11.0
args: ["discovery", "-v", "2", "--domain", "$(POD_NAMESPACE).svc.cluster.local", "--monitoringAddr=:15014"]
securityContext:
privileged: true
env:
- name: PILOT_AGENT_OPTS
value: "--connectTimeout 1s --trust-domain=cluster.local"
resources:
requests:
cpu: "100m"
memory: "128Mi"
limits:
cpu: "200m"
memory: "256Mi"
volumeMounts:
- name: istio
mountPath: /etc/istio
readOnly: true
terminationGracePeriodSeconds: 5
dnsPolicy: ClusterFirstWithHostNet
hostNetwork: true
nodeSelector:
beta.kubernetes.io/os: linux
tolerations:
- key: node-role.kubernetes.io/master
effect: NoSchedule
volumes:
- name: istio
configMap:
name: istio
```
其中,`enableIPv6: true` 表示启用 IPv6 支持。在 DaemonSet 中,通过 `hostNetwork: true` 表示使用主机网络模式,从而使 Pilot-agent 可以同时支持 IPv4 和 IPv6 地址。