package expose
import "k8s.io/kubectl/pkg/cmd/expose"
Index ¶
- func NewCmdExposeService(f cmdutil.Factory, streams genericclioptions.IOStreams) *cobra.Command
- type ExposeServiceOptions
Functions ¶
func NewCmdExposeService ¶
NewCmdExposeService is a command to expose the service from user's input
Types ¶
type ExposeServiceOptions ¶
type ExposeServiceOptions struct { cmdutil.OverrideOptions FilenameOptions resource.FilenameOptions RecordFlags *genericclioptions.RecordFlags PrintFlags *genericclioptions.PrintFlags PrintObj printers.ResourcePrinterFunc Name string DefaultName string Selector string // Port will be used if a user specifies --port OR the exposed object as one port Port string // Ports will be used iff a user doesn't specify --port AND the exposed object has multiple ports Ports string Labels string ExternalIP string LoadBalancerIP string Type string Protocol string // Protocols will be used to keep port-protocol mapping derived from exposed object Protocols string TargetPort string PortName string SessionAffinity string ClusterIP string DryRunStrategy cmdutil.DryRunStrategy DryRunVerifier *resource.QueryParamVerifier EnforceNamespace bool CanBeExposed polymorphichelpers.CanBeExposedFunc MapBasedSelectorForObject func(runtime.Object) (string, error) PortsForObject polymorphichelpers.PortsForObjectFunc ProtocolsForObject func(runtime.Object) (map[string]string, error) Namespace string Mapper meta.RESTMapper Builder *resource.Builder ClientForMapping func(mapping *meta.RESTMapping) (resource.RESTClient, error) Recorder genericclioptions.Recorder genericclioptions.IOStreams // contains filtered or unexported fields }
ExposeServiceOptions holds the options for kubectl expose command
func NewExposeServiceOptions ¶
func NewExposeServiceOptions(ioStreams genericclioptions.IOStreams) *ExposeServiceOptions
NewExposeServiceOptions creates a new ExposeServiceOptions and return a pointer to the struct
func (*ExposeServiceOptions) Complete ¶
Complete loads data from the command line environment
func (*ExposeServiceOptions) RunExpose ¶
func (o *ExposeServiceOptions) RunExpose(cmd *cobra.Command, args []string) error
RunExpose retrieves the Kubernetes Object from the API server and expose it to a Kubernetes Service
Source Files ¶
expose.go
- Version
- v0.25.10
- Published
- May 18, 2023
- Platform
- js/wasm
- Imports
- 25 packages
- Last checked
- 1 minute ago –
Tools for package owners.