Kubectl expose

From NovaOrdis Knowledge Base
Revision as of 23:04, 13 August 2019 by Ovidiu (talk | contribs) (→‎Overview)
Jump to navigation Jump to search

Internal

Overview

expose dynamically exposes a resource (pod, service, replicationcontroller, deployment, replicaset) as a new service. The default service type is ClusterIP, other type (NodePort, LoadBalancer, or ExternalName) can be specified with --type.

kubectl expose pod pg-0 --port=5432 --name=postgres --type=NodePort