无法通过浏览器本地访问Kubernetes外部服务

llmtgqce  于 2023-11-17  发布在  Kubernetes
关注(0)|答案(1)|浏览(126)

angular.yaml

apiVersion: apps/v1
kind: Deployment
metadata:
  name: angular-deployment
  labels:
    app.kubernetes.io/name: angular
spec:
  replicas: 3
  selector:
    matchLabels:
      app.kubernetes.io/name: angular
  template:
    metadata:
      labels:
        app.kubernetes.io/name: angular    
    spec:
      containers:
      - name: angular
        image: mannu23/angular_app:v1
        ports:
        - containerPort: 30000
        resources:
            limits:
              memory: 200Mi
            requests:
              cpu: 100m
              memory: 200Mi
---
apiVersion: v1
kind: Service
metadata:
  name: angular-service
spec:
  type: NodePort
  selector:
    app.kubernetes.io/name: angular
  ports:
    - protocol: TCP
      port: 30000
      targetPort: 30010

字符串
在浏览器中,我无法打开我的应用程序。请有人帮助解决这个问题。要检查我执行的命令,请点击下面的“终端输出图像”。
Terminal output image

siotufzp

siotufzp1#

您正在将其暴露在端口30000上,并试图访问其他端口。试试这个:http://192.168.49.2:30000

相关问题