grafana-deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: grafana
namespace: ns-grafana
spec:
replicas: 1
selector:
matchLabels:
task: monitoring
name: grafana
template:
metadata:
labels:
task: monitoring
name: grafana
spec:
# hostNetwork: true
containers:
- name: grafana
image: swr.cn-north-4.myhuaweicloud.com/ddn-k8s/docker.io/rancher/mirrored-grafana-grafana:10.3.3
ports:
- containerPort: 3000
protocol: TCP
如果使用Service模式部署可以注释hostNetwork: true
;