kube/svc
This commit is contained in:
parent
5171d21f86
commit
984a59a8f0
1 changed files with 51 additions and 0 deletions
|
@ -113,3 +113,54 @@ Scale
|
||||||
scale deploy my-deployment \
|
scale deploy my-deployment \
|
||||||
--replicas 3 \
|
--replicas 3 \
|
||||||
-n my-namespace
|
-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!
|
||||||
|
|
Loading…
Reference in a new issue