This commit is contained in:
Marc Beninca 2023-07-08 18:59:58 +02:00
parent 5171d21f86
commit 984a59a8f0

View file

@ -113,3 +113,54 @@ Scale
scale deploy my-deployment \
--replicas 3 \
-n my-namespace
Services
========
* ClusterIP (internal)
* ExternalName (internal alias for external DNS)
* LoadBalancer (external dedicated IP) [if available]
* NodePort (exposed via node)
Read
----
.. code:: shell
kubectl \
get services \
-n my-namespace
.. code:: shell
kubectl \
get service my-service \
-n my-namespace
Write
-----
.. code:: shell
kubectl \
expose deployment my-deployment \
--type LoadBalancer \
--name my-load-balancer \
--target-port 8080 \
-n my-namespace
.. code:: shell
kubectl \
delete service my-service \
-n my-namespace
.. code:: shell
kubectl \
edit service my-service \
-n my-namespace
.. warning::
ClusterIP is immutable!