Kubernetes- 403禁止发行

时间:2018-09-10 08:19:42

标签: docker docker-compose azure-devops kubernetes-ingress azure-kubernetes

我正在将Java服务从VSTS部署到Docker,然后再部署到Kubernetes。我能够从ACR成功推送并运行图像。进入Kubernetes后,我无法从Kubernetes浏览该服务。

apiVersion: apps/v1
kind : Deployment
metadata : 
  name: xservice
  labels: 
    app: xserviceapi
spec: 
  template: 
    metadata: 
      labels: 
        app: xserviceapi
        type : Back-end
    spec: 
      containers: 
      - name: xservice
        image : acr.azurecr.io/xservice:latest
        imagePullPolicy: Always
        ports: 
        - containerPort: 80
      imagePullSecrets:
      - name: regcre
  replicas: 1
  selector: 
   matchLabels: 
    app: xserviceapi
---
apiVersion: v1
kind: Service
metadata:
  name: xservice
spec:
  type: LoadBalancer
  ports:
  - port: 80
  selector:
    app: xserviceapi

1 个答案:

答案 0 :(得分:0)

如@OnurYartaşi所述,您应该可以使用40.68.134.174 IP地址来访问服务。