Deployment privoxy

apiVersion: apps/v1
kind: Deployment
metadata:
  name: privoxy
  namespace: sre
  labels:
    app/name: privoxy

spec:
  replicas: 1
  selector:
    matchLabels:
      app/name: privoxy
  template:
    metadata:
      labels:
        app/name: privoxy
    spec:
      containers:
        - image: vimagick/privoxy
          imagePullPolicy: IfNotPresent
          name: privoxy
          ports:
            - containerPort: 8118
              name: privoxy
              protocol: TCP

Deployment privoxy-01

apiVersion: apps/v1
kind: Deployment
metadata:
  name: privoxy-01
  namespace: sre
  labels:
    app/name: privoxy

spec:
  replicas: 1
  selector:
    matchLabels:
      app/name: privoxy
  template:
    metadata:
      annotations:
        k8s.aliyun.com/pod-with-eip: "true" # 为Nginx容器自动分配公网EIP地址。
        k8s.aliyun.com/pod-eip-instanceid: "eip-12344444444444444"
      labels:
        app/name: privoxy
    spec:
      containers:
        - image: vimagick/privoxy
          imagePullPolicy: IfNotPresent
          name: privoxy
          ports:
            - containerPort: 8118
              name: privoxy
              protocol: TCP

svc

apiVersion: v1
kind: Service
metadata:
  name: privoxy
  namespace: sre
  labels:
    app/name: privoxy
spec:
  ports:
    - name: privoxy
      port: 8118
      protocol: TCP
      targetPort: 8118
  selector:
    app/name: privoxy
  sessionAffinity: None
  type: ClusterIP

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注

Captcha Code