package app
import "k8s.io/kubernetes/cmd/kube-proxy/app"
Package app does all of the work necessary to configure and run a Kubernetes app process.
Package app does all of the work necessary to configure and run a Kubernetes app process.
Index ¶
- func NewProxyCommand() *cobra.Command
- type Options
- func NewOptions() *Options
- func (o *Options) AddFlags(fs *pflag.FlagSet)
- func (o *Options) Complete(fs *pflag.FlagSet) error
- func (o *Options) Run(ctx context.Context) error
- func (o *Options) Validate() error
- type ProxyServer
Functions ¶
func NewProxyCommand ¶
NewProxyCommand creates a *cobra.Command object with default parameters
Types ¶
type Options ¶
type Options struct {
// ConfigFile is the location of the proxy server's configuration file.
ConfigFile string
// WriteConfigTo is the path where the default configuration will be written.
WriteConfigTo string
// CleanupAndExit, when true, makes the proxy server clean up iptables and ipvs rules, then exit.
CleanupAndExit bool
// InitAndExit, when true, makes the proxy server makes configurations that need privileged access, then exit.
InitAndExit bool
// contains filtered or unexported fields
}
Options contains everything necessary to create and run a proxy server.
func NewOptions ¶
func NewOptions() *Options
NewOptions returns initialized Options
func (*Options) AddFlags ¶
AddFlags adds flags to fs and binds them to options.
func (*Options) Complete ¶
Complete completes all the required options.
func (*Options) Run ¶
Run runs the specified ProxyServer.
func (*Options) Validate ¶
Validate validates all the required options.
type ProxyServer ¶
type ProxyServer struct {
Config *kubeproxyconfig.KubeProxyConfiguration
Client clientset.Interface
Broadcaster events.EventBroadcaster
Recorder events.EventRecorder
NodeRef *v1.ObjectReference
HealthzServer *healthcheck.ProxyHealthServer
NodeName string
PrimaryIPFamily v1.IPFamily
NodeIPs map[v1.IPFamily]net.IP
NodeManager *proxy.NodeManager
Proxier proxy.Provider
// contains filtered or unexported fields
}
ProxyServer represents all the parameters required to start the Kubernetes proxy server. All fields are required.
func (*ProxyServer) Run ¶
func (s *ProxyServer) Run(ctx context.Context) error
Run runs the specified ProxyServer. This should never exit (unless CleanupAndExit is set). TODO: At the moment, Run() cannot return a nil error, otherwise it's caller will never exit. Update callers of Run to handle nil errors.
Source Files ¶
init_linux.go options.go server.go server_linux.go
- Version
- v1.36.0 (latest)
- Published
- Apr 22, 2026
- Platform
- linux/amd64
- Imports
- 78 packages
- Last checked
- 28 seconds ago –
Tools for package owners.