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
1条答案
按热度按时间siotufzp1#
您正在将其暴露在端口30000上,并试图访问其他端口。试试这个:
http://192.168.49.2:30000