Kubernetes Service Operations: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 12: Line 12:


==With Metadata==
==With Metadata==
Describe the service in a metadata YAML file:
POST it with:
<syntaxhighlight lang='bash'>
kubectl apply -f ./service.yaml
</syntaxhighlight>

Revision as of 00:23, 20 September 2020

Internal

Create a Service

With CLI

A service of any type (ClusterIP, NodePort, LoadBalancer, or ExternalName) can be created with the kubectl expose command.

More details:

kubectl expose

With Metadata

Describe the service in a metadata YAML file:

POST it with:

kubectl apply -f ./service.yaml