<p>Using Kubernetes on Azure Container Service (not the new AKS though).</p>

<p>I'm deploying a front-end up like this:</p>

<pre><code>apiVersion: apps/v1beta1
kind: Deployment
metadata:
  name: frontend-deployment
spec:
  selector:
    matchLabels:
      app: frontend
  replicas: 2
  template:
    metadata:
      labels:
        app: frontend
    spec:
      containers:
      - name: frontend
        image: etc/etc
        imagePullPolicy: IfNotPresent
        ports:
        - containerPort: 3000
---
apiVersion: v1
kind: Service
metadata:
  name: frontend
spec:
  type: LoadBalancer
  ports:
  - port: 80
    targetPort: 3000
  selector:
    app: frontend
</code></pre>

<p>I can see that it's started correctly from the logs.</p>

<p>From <code>kubectl get services</code> I can see that it has been assigned an External IP. But when I try to access that via HTTP it just hangs.</p>

<p>I also can see in the Azure Portal that the Azure Load Balancer was created and is pointing to the correct external IP and backend pool.</p>

<p>Can anyone tell me if I somehow messed up the port assignments in the pod definition?</p>

<p>--</p>

<p>Update: Somehow it started working on it's own (or seemed like). But when I tried to re-create it as a Service instead of Deployment it stopped working</p>

<p>Here's my Service:</p>

<p>This is my config:</p>

<pre><code>apiVersion: v1
kind: Service
metadata:
  creationTimestamp: null
  name: meteor
spec:
  externalTrafficPolicy: Cluster
  ports:
  - port: 80
    protocol: TCP
    targetPort: http-server
  selector:
    app: frontend
  sessionAffinity: ClientIP
  type: LoadBalancer
</code></pre>

<p>It creates the external IP for the load balancer, and I can see that it is properly matching the pods. but I get a timeout when I try to connect to the external IP. Meanwhile the load balancer that was created as part of the deployment continues to work just fine.</p>

<blockquote>
  <p>do you know how to change the agent VM size in an existing ACS
  deployment?</p>
</blockquote>

<p>We can change k8s agent via Azure portal, the agent in Azure is a VM, we should <strong>resize</strong> the VM :</p>

<p><a href="https://i.stack.imgur.com/ixx5q.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ixx5q.png" alt="enter image description here"></a></p>

<p><a href="https://i.stack.imgur.com/5wIKP.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/5wIKP.png" alt="enter image description here"></a></p>

<p>Hope this helps.</p>
