Name: abcxyz5
Namespace: diyclientapps
Labels: <none>
Annotations: kubectl.kubernetes.io/last-applied-configuration={"apiVersion":"v1","kind":"Service","metadata":{"annotations":{},"name":"abcxyz5","namespace":"diyclientapps"},"spec":{"ports":[{"port":8080,"protocol"...
Selector: app=abcxyz5
Type: NodePort
IP: 10.97.214.209
Port: <unset> 8080/TCP
NodePort: <unset> 30097/TCP
Endpoints: <none>
Session Affinity: None
Events: <none>
这是我的服务定义:
apiVersion: v1
kind: Service
spec:
selector:
app: abcxyz5
ports:
- port: 8080
targetPort: 8123
protocol: TCP
type: NodePort
metadata:
name: abcxyz5
为什么不使用 8123 的 targetPort 值?尽管如此,我无法访问此服务:
telnet 192.168.99.100 30097
Trying 192.168.99.100...
telnet: Unable to connect to remote host: Connection refused
我已经引用了从以下地址返回的 IP:minikube ip
: 192.168.99.100
。
选择器不匹配任何端点。
我修改了它,现在描述服务命令显示:N
ame: abcxyz7
Namespace: diyclientapps
Labels: <none>
Annotations: <none>
Selector: appId=abcxyz7
Type: NodePort
IP: 10.99.201.118
Port: http 8080/TCP
NodePort: http 30385/TCP
Endpoints: 172.17.0.11:8080
Session Affinity: None
Events: <none>
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句