[英]Azure kubernetes service loadbalancer external IP not accessible
[英]Kubernetes service - service IP address is not accessible
我正在使用aks服务。 我在Azure容器注册表中有一个Tensorflow服务映像。 现在,当我部署服务时,公共服务终结点不可访问,也无法ping通。
我的映像在端口8501处公开,因此我将其用作yaml中的目标端口。
这是我用于此部署的yaml文件。
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: my-model-gpu
spec:
replicas: 1
template:
metadata:
labels:
app: my-model-gpu
spec:
containers:
- name: my-model-gpu
image: dsdemocr.azurecr.io/work-place-safety-gpu
ports:
- containerPort: 8501
resources:
limits:
nvidia.com/gpu: 1
imagePullSecrets:
- name: registrykey
---
apiVersion: v1
kind: Service
metadata:
name: my-model-gpu
spec:
type: LoadBalancer
ports:
- port: 8501
protocol: "TCP"
targetPort: 8501
selector:
app: my-model-gpu
以下是我的svc说明: kubectl describe svc my-model-gpu
Name: my-model-gpu
Namespace: default
Labels: <none>
Annotations: kubectl.kubernetes.io/last-applied-configuration:
{"apiVersion":"v1","kind":"Service","metadata":{"annotations":{},"name":"my-model-gpu","namespace":"default"},"spec":{"ports":[{"port":850...
Selector: app=my-model-gpu
Type: LoadBalancer
IP: 10.0.244.106
LoadBalancer Ingress: 52.183.17.101
Port: <unset> 8501/TCP
TargetPort: 8501/TCP
NodePort: <unset> 31546/TCP
Endpoints: 10.244.0.22:8501
Session Affinity: None
External Traffic Policy: Cluster
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal EnsuringLoadBalancer 10m service-controller Ensuring load balancer
Normal EnsuredLoadBalancer 9m8s service-controller Ensured load balancer
看起来我在端口映射上犯了一些错误。 任何帮助深表感谢。
请遵循社区提供的建议:
研究此主题后,我建议您查看一下那些特定于Azure的信息:
如果Kubernetes服务清单的loadBalancerIP属性中定义的静态IP地址不存在,或者尚未在节点资源组中创建,并且未配置任何其他委托,则负载均衡器服务创建失败。
If using Advanced networking it creates the vNet in the same resource group as the AKS service by default.
注意:
当前仅支持基本IP SKU。 支持标准IP资源SKU的工作正在进行中。 有关更多信息, 请参见Azure中的IP地址类型和分配方法 。
其他资源:
Azure-LoadBalnacer相关:
希望能有所帮助。
我尝试访问的容器在8501上没有打开任何端口,一旦我修复它,它就会很好地工作。
我认为您需要在52.183.17.101:8501
上访问应用程序
因为您没有定义将流量路由到负载均衡器的80端口的路由。 默认情况下,它将创建监听8501的负载均衡器。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.