diff --git a/rtfd/public/kubernetes/index.rst b/rtfd/public/kubernetes/index.rst index ff1556c..14c2765 100644 --- a/rtfd/public/kubernetes/index.rst +++ b/rtfd/public/kubernetes/index.rst @@ -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!