Difference between revisions of "Kubectl create service loadbalancer"

From wikieduonline
Jump to navigation Jump to search
Tags: Mobile web edit, Mobile edit
 
(5 intermediate revisions by the same user not shown)
Line 6: Line 6:
  
  
  apiVersion: v1
+
  {{type LoadBalancer}}
kind: Service
 
metadata:
 
  name: example-service
 
spec:
 
  selector:
 
    app: example
 
  ports:
 
    - port: 8765
 
      targetPort: 9376
 
  type: LoadBalancer
 
  
  
 
== Activities ==
 
== Activities ==
 
* [[Understand difference between Ingress vs Load Balancer]]
 
* [[Understand difference between Ingress vs Load Balancer]]
 +
* Understand the differences between: <code>kubectl create service loadbalancer</code> and <code>[[kubectl expose deployment]]</code>
  
 
== Related ==
 
== Related ==
 
* [[Ingress]]
 
* [[Ingress]]
* [[NGINX Ingress Controller]]
+
* [[NGINX Ingress Controller]]: <code>[[helm install nginx]]</code>
 
* [[AWS Load Balancer Controller]]
 
* [[AWS Load Balancer Controller]]
 
* <code>[[kubectl describe service]]</code>  [<code>[[kubectl describe service loadbalancer | loadbalancer]]</code>]
 
* <code>[[kubectl describe service]]</code>  [<code>[[kubectl describe service loadbalancer | loadbalancer]]</code>]
* <code>[[kubectl expose deployment]]</code>
+
* <code>[[kubectl expose deployment]]: kubectl expose deployment mydeployment-name --type=LoadBalancer --name=mylbformydeployment</code>
  
 
== See also ==
 
== See also ==

Latest revision as of 20:19, 8 November 2023

https://kubernetes.io/docs/reference/generated/kubectl/kubectl-commands#-em-service-loadbalancer-em-

kubectl create service loadbalancer
kubectl create service loadbalancer my-lbs --tcp=5678:8080


 apiVersion: v1
kind: Service
metadata:
  name: example-service
spec:
  selector:
    app: example
  ports:
    - port: 8765
      targetPort: 9376
  type: LoadBalancer


Activities[edit]

Related[edit]

See also[edit]

Advertising: