nginx-pod.yaml

apiVersion: v1
kind: Pod
metadata:
  name: webapp
  labels:
    app: webapp
spec:
  containers:
  - name: webapp
    image: nginx
    ports:
    - containerPort: 80
      hostPort: 80


nginx-abroad.yaml

apiVersion: v1
kind: Service
metadata:
  name: webapp
spec:
  type: NodePort
  ports:
  - port: 80
    targetPort: 80
    nodePort: 8082
  selector:
    app: webapp

 

相关文章:

  • 2021-10-20
  • 2021-11-17
  • 2022-12-23
  • 2021-11-13
  • 2022-12-23
  • 2021-11-15
  • 2021-05-07
猜你喜欢
  • 2021-10-01
  • 2021-11-27
  • 2021-12-05
  • 2022-12-23
  • 2022-01-12
  • 2022-01-04
  • 2021-10-08
相关资源
相似解决方案