New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mixed protocols for Azure LoadBalancer is working as expected #73849

Open
feiskyer opened this Issue Feb 8, 2019 · 2 comments

Comments

Projects
None yet
3 participants
@feiskyer
Copy link
Member

feiskyer commented Feb 8, 2019

What happened:

Mixed protocols LoadBalacer services are not supported by apiserver. It will decline those services with error "cannot create an external load balancer with non-TCP/UDP ports". Hence #67986 added another annotation service.beta.kubernetes.io/azure-load-balancer-mixed-protocols: "true" for this purpose. e.g.

apiVersion: v1
kind: Service
metadata:
  annotations:
    service.beta.kubernetes.io/azure-load-balancer-mixed-protocols: "true"
  name: web
  namespace: default
spec:
  ports:
  - port: 80
    protocol: TCP
    targetPort: 80
  selector:
    app: web
  sessionAffinity: None
  type: LoadBalancer

However, this is still not working. The UDP LB rule is still not created by the above service.

What you expected to happen:

Both TCP and UDP rules created for the service.

How to reproduce it (as minimally and precisely as possible):

Create a service with above annotation.

Anything else we need to know?:

Environment:

  • Kubernetes version (use kubectl version): 1.13.1
  • Cloud provider or hardware configuration: azure
  • OS (e.g. from /etc/os-release):
  • Kernel (e.g. uname -a):
  • Install tools:
  • Others:

/sig azure
/kind bug
/assign

@andyzhangx

This comment has been minimized.

Copy link
Member

andyzhangx commented Feb 18, 2019

@feiskyer I tried with the above exact service config, and it works well on my k8s v1.13.3 cluster created by aks-engine, how can I repro that error?

Every 2.0s: kubectl describe svc web                                                                                                 Mon Feb 18 06:38:46 2019

Name:                     web
Namespace:                default
Labels:                   <none>
Annotations:              kubectl.kubernetes.io/last-applied-configuration:
                            {"apiVersion":"v1","kind":"Service","metadata":{"annotations":{"service.beta.kubernetes.io/azure-load-balancer-mixed-protocols":"
true"},"n...
                          service.beta.kubernetes.io/azure-load-balancer-mixed-protocols: true
Selector:                 app=web
Type:                     LoadBalancer
IP:                       10.0.192.191
LoadBalancer Ingress:     52.177.216.169
Port:                     <unset>  80/TCP
TargetPort:               80/TCP
NodePort:                 <unset>  31245/TCP
Endpoints:                <none>
Session Affinity:         None
External Traffic Policy:  Cluster
Events:
  Type    Reason                Age   From                Message
  ----    ------                ----  ----                -------
  Normal  EnsuringLoadBalancer  2m6s  service-controller  Ensuring load balancer
  Normal  EnsuredLoadBalancer   19s   service-controller  Ensured load balancer
@andyzhangx

This comment has been minimized.

Copy link
Member

andyzhangx commented Feb 18, 2019

@feiskyer correction: there is no error, while UDP port rule is not created, I can repro that.

@andyzhangx andyzhangx referenced a pull request that will close this issue Feb 18, 2019

Open

fix mixed protocol issue for azure load balancer #74200

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment