package create
import "k8s.io/kubernetes/pkg/kubectl/cmd/create"
Index ¶
- func NameFromCommandArgs(cmd *cobra.Command, args []string) (string, error)
- func NewCmdCreate(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command
- func NewCmdCreateClusterRole(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command
- func NewCmdCreateClusterRoleBinding(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command
- func NewCmdCreateConfigMap(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command
- func NewCmdCreateDeployment(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command
- func NewCmdCreateJob(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command
- func NewCmdCreateNamespace(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command
- func NewCmdCreatePodDisruptionBudget(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command
- func NewCmdCreatePriorityClass(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command
- func NewCmdCreateQuota(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command
- func NewCmdCreateRole(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command
- func NewCmdCreateRoleBinding(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command
- func NewCmdCreateSecret(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command
- func NewCmdCreateSecretDockerRegistry(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command
- func NewCmdCreateSecretGeneric(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command
- func NewCmdCreateSecretTLS(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command
- func NewCmdCreateService(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command
- func NewCmdCreateServiceAccount(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command
- func NewCmdCreateServiceClusterIP(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command
- func NewCmdCreateServiceExternalName(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command
- func NewCmdCreateServiceLoadBalancer(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command
- func NewCmdCreateServiceNodePort(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command
- func RunEditOnCreate(f cmdutil.Factory, printFlags *genericclioptions.PrintFlags, recordFlags *genericclioptions.RecordFlags, ioStreams genericclioptions.IOStreams, cmd *cobra.Command, options *resource.FilenameOptions) error
- type ClusterRoleBindingOpts
- func (o *ClusterRoleBindingOpts) Complete(f cmdutil.Factory, cmd *cobra.Command, args []string) error
- func (o *ClusterRoleBindingOpts) Run() error
- type ConfigMapOpts
- func (o *ConfigMapOpts) Complete(f cmdutil.Factory, cmd *cobra.Command, args []string) error
- func (o *ConfigMapOpts) Run() error
- type CreateClusterRoleOptions
- func (c *CreateClusterRoleOptions) Complete(f cmdutil.Factory, cmd *cobra.Command, args []string) error
- func (c *CreateClusterRoleOptions) RunCreateRole() error
- func (c *CreateClusterRoleOptions) Validate() error
- type CreateJobOptions
- func NewCreateJobOptions(ioStreams genericclioptions.IOStreams) *CreateJobOptions
- func (o *CreateJobOptions) Complete(f cmdutil.Factory, cmd *cobra.Command, args []string) error
- func (o *CreateJobOptions) Run() error
- func (o *CreateJobOptions) Validate() error
- type CreateOptions
- func NewCreateOptions(ioStreams genericclioptions.IOStreams) *CreateOptions
- func (o *CreateOptions) Complete(f cmdutil.Factory, cmd *cobra.Command) error
- func (o *CreateOptions) RunCreate(f cmdutil.Factory, cmd *cobra.Command) error
- func (o *CreateOptions) ValidateArgs(cmd *cobra.Command, args []string) error
- type CreateRoleOptions
- func NewCreateRoleOptions(ioStreams genericclioptions.IOStreams) *CreateRoleOptions
- func (o *CreateRoleOptions) Complete(f cmdutil.Factory, cmd *cobra.Command, args []string) error
- func (o *CreateRoleOptions) RunCreateRole() error
- func (o *CreateRoleOptions) Validate() error
- type CreateSubcommandOptions
- func NewCreateSubcommandOptions(ioStreams genericclioptions.IOStreams) *CreateSubcommandOptions
- func (o *CreateSubcommandOptions) Complete(f cmdutil.Factory, cmd *cobra.Command, args []string, generator kubectl.StructuredGenerator) error
- func (o *CreateSubcommandOptions) Run() error
- type DeploymentOpts
- func (o *DeploymentOpts) Complete(f cmdutil.Factory, cmd *cobra.Command, args []string) error
- func (o *DeploymentOpts) Run() error
- type NamespaceOpts
- func (o *NamespaceOpts) Complete(f cmdutil.Factory, cmd *cobra.Command, args []string) error
- func (o *NamespaceOpts) Run() error
- type PodDisruptionBudgetOpts
- func (o *PodDisruptionBudgetOpts) Complete(f cmdutil.Factory, cmd *cobra.Command, args []string) error
- func (o *PodDisruptionBudgetOpts) Run() error
- type PriorityClassOpts
- func (o *PriorityClassOpts) Complete(f cmdutil.Factory, cmd *cobra.Command, args []string) error
- func (o *PriorityClassOpts) Run() error
- type QuotaOpts
- func (o *QuotaOpts) Complete(f cmdutil.Factory, cmd *cobra.Command, args []string) error
- func (o *QuotaOpts) Run() error
- type ResourceOptions
- type RoleBindingOpts
- func (o *RoleBindingOpts) Complete(f cmdutil.Factory, cmd *cobra.Command, args []string) error
- func (o *RoleBindingOpts) Run() error
- type SecretDockerRegistryOpts
- func (o *SecretDockerRegistryOpts) Complete(f cmdutil.Factory, cmd *cobra.Command, args []string) error
- func (o *SecretDockerRegistryOpts) Run() error
- type SecretGenericOpts
- func (o *SecretGenericOpts) Complete(f cmdutil.Factory, cmd *cobra.Command, args []string) error
- func (o *SecretGenericOpts) Run() error
- type SecretTLSOpts
- func (o *SecretTLSOpts) Complete(f cmdutil.Factory, cmd *cobra.Command, args []string) error
- func (o *SecretTLSOpts) Run() error
- type ServiceAccountOpts
- func (o *ServiceAccountOpts) Complete(f cmdutil.Factory, cmd *cobra.Command, args []string) error
- func (o *ServiceAccountOpts) Run() error
- type ServiceClusterIPOpts
- func (o *ServiceClusterIPOpts) Complete(f cmdutil.Factory, cmd *cobra.Command, args []string) error
- func (o *ServiceClusterIPOpts) Run() error
- type ServiceExternalNameOpts
- func (o *ServiceExternalNameOpts) Complete(f cmdutil.Factory, cmd *cobra.Command, args []string) error
- func (o *ServiceExternalNameOpts) Run() error
- type ServiceLoadBalancerOpts
- func (o *ServiceLoadBalancerOpts) Complete(f cmdutil.Factory, cmd *cobra.Command, args []string) error
- func (o *ServiceLoadBalancerOpts) Run() error
- type ServiceNodePortOpts
Functions ¶
func NameFromCommandArgs ¶
NameFromCommandArgs is a utility function for commands that assume the first argument is a resource name
func NewCmdCreate ¶
func NewCmdCreateClusterRole ¶
func NewCmdCreateClusterRole(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command
ClusterRole is a command to ease creating ClusterRoles.
func NewCmdCreateClusterRoleBinding ¶
func NewCmdCreateClusterRoleBinding(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command
ClusterRoleBinding is a command to ease creating ClusterRoleBindings.
func NewCmdCreateConfigMap ¶
ConfigMap is a command to ease creating ConfigMaps.
func NewCmdCreateDeployment ¶
func NewCmdCreateDeployment(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command
NewCmdCreateDeployment is a macro command to create a new deployment. This command is better known to users as `kubectl create deployment`. Note that this command overlaps significantly with the `kubectl run` command.
func NewCmdCreateJob ¶
NewCmdCreateJob is a command to ease creating Jobs from CronJobs.
func NewCmdCreateNamespace ¶
NewCmdCreateNamespace is a macro command to create a new namespace
func NewCmdCreatePodDisruptionBudget ¶
func NewCmdCreatePodDisruptionBudget(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command
NewCmdCreatePodDisruptionBudget is a macro command to create a new pod disruption budget.
func NewCmdCreatePriorityClass ¶
func NewCmdCreatePriorityClass(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command
NewCmdCreatePriorityClass is a macro command to create a new priorityClass.
func NewCmdCreateQuota ¶
NewCmdCreateQuota is a macro command to create a new quota
func NewCmdCreateRole ¶
Role is a command to ease creating Roles.
func NewCmdCreateRoleBinding ¶
func NewCmdCreateRoleBinding(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command
RoleBinding is a command to ease creating RoleBindings.
func NewCmdCreateSecret ¶
NewCmdCreateSecret groups subcommands to create various types of secrets
func NewCmdCreateSecretDockerRegistry ¶
func NewCmdCreateSecretDockerRegistry(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command
NewCmdCreateSecretDockerRegistry is a macro command for creating secrets to work with Docker registries
func NewCmdCreateSecretGeneric ¶
func NewCmdCreateSecretGeneric(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command
NewCmdCreateSecretGeneric is a command to create generic secrets from files, directories, or literal values
func NewCmdCreateSecretTLS ¶
NewCmdCreateSecretTLS is a macro command for creating secrets to work with Docker registries
func NewCmdCreateService ¶
NewCmdCreateService is a macro command to create a new service
func NewCmdCreateServiceAccount ¶
func NewCmdCreateServiceAccount(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command
NewCmdCreateServiceAccount is a macro command to create a new service account
func NewCmdCreateServiceClusterIP ¶
func NewCmdCreateServiceClusterIP(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command
NewCmdCreateServiceClusterIP is a command to create a ClusterIP service
func NewCmdCreateServiceExternalName ¶
func NewCmdCreateServiceExternalName(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command
NewCmdCreateServiceExternalName is a macro command for creating an ExternalName service
func NewCmdCreateServiceLoadBalancer ¶
func NewCmdCreateServiceLoadBalancer(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command
NewCmdCreateServiceLoadBalancer is a macro command for creating a LoadBalancer service
func NewCmdCreateServiceNodePort ¶
func NewCmdCreateServiceNodePort(f cmdutil.Factory, ioStreams genericclioptions.IOStreams) *cobra.Command
NewCmdCreateServiceNodePort is a macro command for creating a NodePort service
func RunEditOnCreate ¶
func RunEditOnCreate(f cmdutil.Factory, printFlags *genericclioptions.PrintFlags, recordFlags *genericclioptions.RecordFlags, ioStreams genericclioptions.IOStreams, cmd *cobra.Command, options *resource.FilenameOptions) error
Types ¶
type ClusterRoleBindingOpts ¶
type ClusterRoleBindingOpts struct { CreateSubcommandOptions *CreateSubcommandOptions }
func (*ClusterRoleBindingOpts) Complete ¶
func (o *ClusterRoleBindingOpts) Complete(f cmdutil.Factory, cmd *cobra.Command, args []string) error
func (*ClusterRoleBindingOpts) Run ¶
func (o *ClusterRoleBindingOpts) Run() error
CreateClusterRoleBinding is the implementation of the create clusterrolebinding command.
type ConfigMapOpts ¶
type ConfigMapOpts struct { CreateSubcommandOptions *CreateSubcommandOptions }
func (*ConfigMapOpts) Complete ¶
func (*ConfigMapOpts) Run ¶
func (o *ConfigMapOpts) Run() error
CreateConfigMap is the implementation of the create configmap command.
type CreateClusterRoleOptions ¶
type CreateClusterRoleOptions struct { *CreateRoleOptions NonResourceURLs []string AggregationRule map[string]string }
func (*CreateClusterRoleOptions) Complete ¶
func (c *CreateClusterRoleOptions) Complete(f cmdutil.Factory, cmd *cobra.Command, args []string) error
func (*CreateClusterRoleOptions) RunCreateRole ¶
func (c *CreateClusterRoleOptions) RunCreateRole() error
func (*CreateClusterRoleOptions) Validate ¶
func (c *CreateClusterRoleOptions) Validate() error
type CreateJobOptions ¶
type CreateJobOptions struct { PrintFlags *genericclioptions.PrintFlags PrintObj func(obj runtime.Object) error Name string Image string From string Command []string Namespace string Client batchv1client.BatchV1Interface DryRun bool Builder *resource.Builder Cmd *cobra.Command genericclioptions.IOStreams }
func NewCreateJobOptions ¶
func NewCreateJobOptions(ioStreams genericclioptions.IOStreams) *CreateJobOptions
func (*CreateJobOptions) Complete ¶
func (*CreateJobOptions) Run ¶
func (o *CreateJobOptions) Run() error
func (*CreateJobOptions) Validate ¶
func (o *CreateJobOptions) Validate() error
type CreateOptions ¶
type CreateOptions struct { PrintFlags *genericclioptions.PrintFlags RecordFlags *genericclioptions.RecordFlags DryRun bool FilenameOptions resource.FilenameOptions Selector string EditBeforeCreate bool Raw string Recorder genericclioptions.Recorder PrintObj func(obj kruntime.Object) error genericclioptions.IOStreams }
func NewCreateOptions ¶
func NewCreateOptions(ioStreams genericclioptions.IOStreams) *CreateOptions
func (*CreateOptions) Complete ¶
func (*CreateOptions) RunCreate ¶
func (*CreateOptions) ValidateArgs ¶
func (o *CreateOptions) ValidateArgs(cmd *cobra.Command, args []string) error
type CreateRoleOptions ¶
type CreateRoleOptions struct { PrintFlags *genericclioptions.PrintFlags Name string Verbs []string Resources []ResourceOptions ResourceNames []string DryRun bool OutputFormat string Namespace string Client clientgorbacv1.RbacV1Interface Mapper meta.RESTMapper PrintObj func(obj runtime.Object) error genericclioptions.IOStreams }
func NewCreateRoleOptions ¶
func NewCreateRoleOptions(ioStreams genericclioptions.IOStreams) *CreateRoleOptions
func (*CreateRoleOptions) Complete ¶
func (*CreateRoleOptions) RunCreateRole ¶
func (o *CreateRoleOptions) RunCreateRole() error
func (*CreateRoleOptions) Validate ¶
func (o *CreateRoleOptions) Validate() error
type CreateSubcommandOptions ¶
type CreateSubcommandOptions struct { // PrintFlags holds options necessary for obtaining a printer PrintFlags *genericclioptions.PrintFlags // Name of resource being created Name string // StructuredGenerator is the resource generator for the object being created StructuredGenerator kubectl.StructuredGenerator // DryRun is true if the command should be simulated but not run against the server DryRun bool CreateAnnotation bool Namespace string EnforceNamespace bool Mapper meta.RESTMapper DynamicClient dynamic.Interface PrintObj printers.ResourcePrinterFunc genericclioptions.IOStreams }
CreateSubcommandOptions is an options struct to support create subcommands
func NewCreateSubcommandOptions ¶
func NewCreateSubcommandOptions(ioStreams genericclioptions.IOStreams) *CreateSubcommandOptions
func (*CreateSubcommandOptions) Complete ¶
func (o *CreateSubcommandOptions) Complete(f cmdutil.Factory, cmd *cobra.Command, args []string, generator kubectl.StructuredGenerator) error
func (*CreateSubcommandOptions) Run ¶
func (o *CreateSubcommandOptions) Run() error
RunCreateSubcommand executes a create subcommand using the specified options
type DeploymentOpts ¶
type DeploymentOpts struct { CreateSubcommandOptions *CreateSubcommandOptions }
func (*DeploymentOpts) Complete ¶
func (*DeploymentOpts) Run ¶
func (o *DeploymentOpts) Run() error
createDeployment 1. Reads user config values from Cobra. 2. Sets up the correct Generator object. 3. Calls RunCreateSubcommand.
type NamespaceOpts ¶
type NamespaceOpts struct { CreateSubcommandOptions *CreateSubcommandOptions }
func (*NamespaceOpts) Complete ¶
func (*NamespaceOpts) Run ¶
func (o *NamespaceOpts) Run() error
CreateNamespace implements the behavior to run the create namespace command
type PodDisruptionBudgetOpts ¶
type PodDisruptionBudgetOpts struct { CreateSubcommandOptions *CreateSubcommandOptions }
func (*PodDisruptionBudgetOpts) Complete ¶
func (o *PodDisruptionBudgetOpts) Complete(f cmdutil.Factory, cmd *cobra.Command, args []string) error
func (*PodDisruptionBudgetOpts) Run ¶
func (o *PodDisruptionBudgetOpts) Run() error
CreatePodDisruptionBudget implements the behavior to run the create pdb command.
type PriorityClassOpts ¶
type PriorityClassOpts struct { CreateSubcommandOptions *CreateSubcommandOptions }
func (*PriorityClassOpts) Complete ¶
func (*PriorityClassOpts) Run ¶
func (o *PriorityClassOpts) Run() error
CreatePriorityClass implements the behavior to run the create priorityClass command.
type QuotaOpts ¶
type QuotaOpts struct { CreateSubcommandOptions *CreateSubcommandOptions }
func (*QuotaOpts) Complete ¶
func (*QuotaOpts) Run ¶
CreateQuota implements the behavior to run the create quota command
type ResourceOptions ¶
type RoleBindingOpts ¶
type RoleBindingOpts struct { CreateSubcommandOptions *CreateSubcommandOptions }
func (*RoleBindingOpts) Complete ¶
func (*RoleBindingOpts) Run ¶
func (o *RoleBindingOpts) Run() error
type SecretDockerRegistryOpts ¶
type SecretDockerRegistryOpts struct { CreateSubcommandOptions *CreateSubcommandOptions }
func (*SecretDockerRegistryOpts) Complete ¶
func (o *SecretDockerRegistryOpts) Complete(f cmdutil.Factory, cmd *cobra.Command, args []string) error
func (*SecretDockerRegistryOpts) Run ¶
func (o *SecretDockerRegistryOpts) Run() error
CreateSecretDockerRegistry is the implementation of the create secret docker-registry command
type SecretGenericOpts ¶
type SecretGenericOpts struct { CreateSubcommandOptions *CreateSubcommandOptions }
func (*SecretGenericOpts) Complete ¶
func (*SecretGenericOpts) Run ¶
func (o *SecretGenericOpts) Run() error
CreateSecretGeneric is the implementation of the create secret generic command
type SecretTLSOpts ¶
type SecretTLSOpts struct { CreateSubcommandOptions *CreateSubcommandOptions }
func (*SecretTLSOpts) Complete ¶
func (*SecretTLSOpts) Run ¶
func (o *SecretTLSOpts) Run() error
CreateSecretTLS is the implementation of the create secret tls command
type ServiceAccountOpts ¶
type ServiceAccountOpts struct { CreateSubcommandOptions *CreateSubcommandOptions }
func (*ServiceAccountOpts) Complete ¶
func (*ServiceAccountOpts) Run ¶
func (o *ServiceAccountOpts) Run() error
CreateServiceAccount implements the behavior to run the create service account command
type ServiceClusterIPOpts ¶
type ServiceClusterIPOpts struct { CreateSubcommandOptions *CreateSubcommandOptions }
func (*ServiceClusterIPOpts) Complete ¶
func (*ServiceClusterIPOpts) Run ¶
func (o *ServiceClusterIPOpts) Run() error
CreateServiceClusterIP is the implementation of the create service clusterip command
type ServiceExternalNameOpts ¶
type ServiceExternalNameOpts struct { CreateSubcommandOptions *CreateSubcommandOptions }
func (*ServiceExternalNameOpts) Complete ¶
func (o *ServiceExternalNameOpts) Complete(f cmdutil.Factory, cmd *cobra.Command, args []string) error
func (*ServiceExternalNameOpts) Run ¶
func (o *ServiceExternalNameOpts) Run() error
CreateExternalNameService is the implementation of the create service externalname command
type ServiceLoadBalancerOpts ¶
type ServiceLoadBalancerOpts struct { CreateSubcommandOptions *CreateSubcommandOptions }
func (*ServiceLoadBalancerOpts) Complete ¶
func (o *ServiceLoadBalancerOpts) Complete(f cmdutil.Factory, cmd *cobra.Command, args []string) error
func (*ServiceLoadBalancerOpts) Run ¶
func (o *ServiceLoadBalancerOpts) Run() error
CreateServiceLoadBalancer is the implementation of the create service loadbalancer command
type ServiceNodePortOpts ¶
type ServiceNodePortOpts struct { CreateSubcommandOptions *CreateSubcommandOptions }
func (*ServiceNodePortOpts) Complete ¶
func (*ServiceNodePortOpts) Run ¶
func (o *ServiceNodePortOpts) Run() error
CreateServiceNodePort is the implementation of the create service nodeport command
Source Files ¶
create.go create_clusterrole.go create_clusterrolebinding.go create_configmap.go create_deployment.go create_job.go create_namespace.go create_pdb.go create_priorityclass.go create_quota.go create_role.go create_rolebinding.go create_secret.go create_service.go create_serviceaccount.go
- Version
- v1.12.7
- Published
- Mar 22, 2019
- Platform
- js/wasm
- Imports
- 31 packages
- Last checked
- 4 seconds ago –
Tools for package owners.