From 40bd0c6968d6a33c4baae0530919fa37a89499b1 Mon Sep 17 00:00:00 2001 From: Ilya Lesikov Date: Fri, 18 Mar 2022 21:39:39 +0300 Subject: [PATCH 1/6] chore: separate integration and e2e Makefile tasks Signed-off-by: Ilya Lesikov --- Makefile | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index fddd551bc4..f285c2d348 100644 --- a/Makefile +++ b/Makefile @@ -8,11 +8,17 @@ werf: buildah-test: CGO_ENABLED=1 go install -compiler gc -ldflags="-linkmode external -extldflags=-static" -tags="dfrunmount dfssh containers_image_openpgp osusergo exclude_graphdriver_devicemapper netgo no_devmapper static_build" github.com/werf/werf/cmd/buildah-test -acceptance-tests: +integration-tests: export WERF_TEST_K8S_DOCKER_REGISTRY="localhost:5000" export WERF_TEST_K8S_DOCKER_REGISTRY_USERNAME="nobody" export WERF_TEST_K8S_DOCKER_REGISTRY_PASSWORD="" - CGO_ENABLED=1 ginkgo -r -v -compiler gc -ldflags="-linkmode external -extldflags=-static" -tags="dfrunmount dfssh containers_image_openpgp osusergo exclude_graphdriver_devicemapper netgo no_devmapper static_build" integration/suites test/e2e + CGO_ENABLED=1 ginkgo -r -v -compiler gc -ldflags="-linkmode external -extldflags=-static" -tags="dfrunmount dfssh containers_image_openpgp osusergo exclude_graphdriver_devicemapper netgo no_devmapper static_build" integration/suites + +e2e-tests: + export WERF_TEST_K8S_DOCKER_REGISTRY="localhost:5000" + export WERF_TEST_K8S_DOCKER_REGISTRY_USERNAME="nobody" + export WERF_TEST_K8S_DOCKER_REGISTRY_PASSWORD="" + CGO_ENABLED=1 ginkgo -r -v -compiler gc -ldflags="-linkmode external -extldflags=-static" -tags="dfrunmount dfssh containers_image_openpgp osusergo exclude_graphdriver_devicemapper netgo no_devmapper static_build" test/e2e .PHONY: unit-tests unit-tests: From c6435d82a954076a7b76abca342ef78b7419dc44 Mon Sep 17 00:00:00 2001 From: Ilya Lesikov Date: Fri, 18 Mar 2022 21:41:16 +0300 Subject: [PATCH 2/6] feat: kubectl exposed via `werf kubectl` Signed-off-by: Ilya Lesikov --- cmd/werf/kubectl/kubectl.go | 11 +++++++++++ cmd/werf/main.go | 2 ++ 2 files changed, 13 insertions(+) create mode 100644 cmd/werf/kubectl/kubectl.go diff --git a/cmd/werf/kubectl/kubectl.go b/cmd/werf/kubectl/kubectl.go new file mode 100644 index 0000000000..358d60a417 --- /dev/null +++ b/cmd/werf/kubectl/kubectl.go @@ -0,0 +1,11 @@ +package kubectl + +import ( + "github.com/spf13/cobra" + "k8s.io/kubectl/pkg/cmd" +) + +func NewCmd() *cobra.Command { + kubectlRootCmd := cmd.NewDefaultKubectlCommand() + return kubectlRootCmd +} diff --git a/cmd/werf/main.go b/cmd/werf/main.go index 152ed2c521..09f993a971 100644 --- a/cmd/werf/main.go +++ b/cmd/werf/main.go @@ -34,6 +34,7 @@ import ( "github.com/werf/werf/cmd/werf/helm" host_cleanup "github.com/werf/werf/cmd/werf/host/cleanup" host_purge "github.com/werf/werf/cmd/werf/host/purge" + "github.com/werf/werf/cmd/werf/kubectl" managed_images_add "github.com/werf/werf/cmd/werf/managed_images/add" managed_images_ls "github.com/werf/werf/cmd/werf/managed_images/ls" managed_images_rm "github.com/werf/werf/cmd/werf/managed_images/rm" @@ -123,6 +124,7 @@ Find more information at https://werf.io`), hostCmd(), helm.NewCmd(), crCmd(), + kubectl.NewCmd(), }, }, { From 3da444970dc1c92f36c9747849804991df343d6f Mon Sep 17 00:00:00 2001 From: Ilya Lesikov Date: Fri, 18 Mar 2022 21:42:04 +0300 Subject: [PATCH 3/6] feat: new command `werf kube-run` Signed-off-by: Ilya Lesikov --- cmd/werf/kube_run/kube_run.go | 502 ++++++++++++++++++++++++++++++++++ cmd/werf/main.go | 2 + 2 files changed, 504 insertions(+) create mode 100644 cmd/werf/kube_run/kube_run.go diff --git a/cmd/werf/kube_run/kube_run.go b/cmd/werf/kube_run/kube_run.go new file mode 100644 index 0000000000..ee88d3e09c --- /dev/null +++ b/cmd/werf/kube_run/kube_run.go @@ -0,0 +1,502 @@ +package kube_run + +import ( + "context" + "fmt" + "math/rand" + "os" + "os/exec" + "strings" + + "github.com/spf13/cobra" + corev1 "k8s.io/api/core/v1" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/fields" + "k8s.io/apimachinery/pkg/util/validation" + + "github.com/werf/kubedog/pkg/kube" + "github.com/werf/logboek" + "github.com/werf/werf/cmd/werf/common" + "github.com/werf/werf/pkg/build" + "github.com/werf/werf/pkg/config" + "github.com/werf/werf/pkg/config/deploy_params" + "github.com/werf/werf/pkg/container_runtime" + "github.com/werf/werf/pkg/git_repo" + "github.com/werf/werf/pkg/git_repo/gitdata" + "github.com/werf/werf/pkg/giterminism_manager" + "github.com/werf/werf/pkg/image" + "github.com/werf/werf/pkg/logging" + "github.com/werf/werf/pkg/ssh_agent" + "github.com/werf/werf/pkg/storage/lrumeta" + "github.com/werf/werf/pkg/storage/manager" + "github.com/werf/werf/pkg/tmp_manager" + "github.com/werf/werf/pkg/true_git" + "github.com/werf/werf/pkg/werf" + "github.com/werf/werf/pkg/werf/global_warnings" +) + +type cmdDataType struct { + Interactive bool + AllocateTty bool + Rm bool + RmWithNamespace bool + + Pod string + Command []string + ImageName string + Overrides string + ExtraOptions string +} + +var ( + cmdData cmdDataType + commonCmdData common.CmdData +) + +func NewCmd() *cobra.Command { + cmd := &cobra.Command{ + Use: "kube-run [options] [IMAGE_NAME] [-- COMMAND ARG...]", + Short: "Run container for project image in Kubernetes", + Long: common.GetLongCommandDescription(`Run container in Kubernetes for specified project image from werf.yaml (build if needed)`), + DisableFlagsInUseLine: true, + Example: ` # Run specified image + $ werf kube-run --repo test/test application + + # Run interactive shell in the image + $ werf kube-run --repo test/test -it -- sh + + # Run image with specified command + $ werf kube-run --repo test/test -- /app/run.sh`, + Annotations: map[string]string{ + common.DisableOptionsInUseLineAnno: "1", + }, + RunE: func(cmd *cobra.Command, args []string) error { + ctx := common.GetContext() + + defer global_warnings.PrintGlobalWarnings(ctx) + + if err := common.ProcessLogOptions(&commonCmdData); err != nil { + common.PrintHelp(cmd) + return err + } + + if err := processArgs(cmd, args); err != nil { + common.PrintHelp(cmd) + return err + } + + if cmdData.RmWithNamespace && !cmdData.Rm { + return fmt.Errorf("option --rm-with-namespace requires --rm to be set") + } + + if cmdData.AllocateTty && !cmdData.Interactive { + return fmt.Errorf("option --tty requires --interactive to be set") + } + + if cmdData.Pod != "" { + if errMsgs := validation.IsDNS1123Subdomain(cmdData.Pod); len(errMsgs) > 0 { + return fmt.Errorf("--pod name is not a valid subdomain:\n%s", strings.Join(errMsgs, "\n")) + } + } + + if *commonCmdData.Follow { + if cmdData.Interactive || cmdData.AllocateTty { + return fmt.Errorf("--follow mode does not work with -i or -t options") + } + } + + return runMain(ctx) + }, + } + + common.SetupDir(&commonCmdData, cmd) + common.SetupGitWorkTree(&commonCmdData, cmd) + common.SetupConfigTemplatesDir(&commonCmdData, cmd) + common.SetupConfigPath(&commonCmdData, cmd) + common.SetupEnvironment(&commonCmdData, cmd) + common.SetupNamespace(&commonCmdData, cmd) + + common.SetupGiterminismOptions(&commonCmdData, cmd) + + common.SetupTmpDir(&commonCmdData, cmd) + common.SetupHomeDir(&commonCmdData, cmd) + common.SetupSSHKey(&commonCmdData, cmd) + + common.SetupSecondaryStagesStorageOptions(&commonCmdData, cmd) + common.SetupCacheStagesStorageOptions(&commonCmdData, cmd) + common.SetupStagesStorageOptions(&commonCmdData, cmd) + common.SetupFinalStagesStorageOptions(&commonCmdData, cmd) + + common.SetupSkipBuild(&commonCmdData, cmd) + + common.SetupFollow(&commonCmdData, cmd) + + common.SetupDockerConfig(&commonCmdData, cmd, "Command needs granted permissions to read and pull images from the specified repo") + common.SetupInsecureRegistry(&commonCmdData, cmd) + common.SetupSkipTlsVerifyRegistry(&commonCmdData, cmd) + + common.SetupLogOptions(&commonCmdData, cmd) + common.SetupLogProjectDir(&commonCmdData, cmd) + + common.SetupSynchronization(&commonCmdData, cmd) + common.SetupKubeConfig(&commonCmdData, cmd) + common.SetupKubeConfigBase64(&commonCmdData, cmd) + common.SetupKubeContext(&commonCmdData, cmd) + + common.SetupDryRun(&commonCmdData, cmd) + + common.SetupVirtualMerge(&commonCmdData, cmd) + + common.SetupPlatform(&commonCmdData, cmd) + + cmd.Flags().StringVarP(&cmdData.Pod, "pod", "", os.Getenv("WERF_POD"), "Set created pod name (default $WERF_POD or autogenerated if not specified)") + cmd.Flags().StringVarP(&cmdData.Overrides, "overrides", "", os.Getenv("WERF_OVERRIDES"), "Inline JSON to override/extend any fields in created Pod, e.g. to add imagePullSecrets field (default $WERF_OVERRIDES)") + cmd.Flags().StringVarP(&cmdData.ExtraOptions, "extra-options", "", os.Getenv("WERF_EXTRA_OPTIONS"), "Pass extra options to \"kubectl run\" command (default $WERF_EXTRA_OPTIONS)") + cmd.Flags().BoolVarP(&cmdData.Rm, "rm", "", common.GetBoolEnvironmentDefaultTrue("WERF_RM"), "Remove pod after command completion (default $WERF_RM or true if not specified)") + cmd.Flags().BoolVarP(&cmdData.RmWithNamespace, "rm-with-namespace", "", common.GetBoolEnvironmentDefaultFalse("WERF_RM_WITH_NAMESPACE"), "Remove also a namespace after command completion (default $WERF_RM_WITH_NAMESPACE or false if not specified)") + cmd.Flags().BoolVarP(&cmdData.Interactive, "interactive", "i", common.GetBoolEnvironmentDefaultFalse("WERF_INTERACTIVE"), "Enable interactive mode (default $WERF_INTERACTIVE or false if not specified)") + cmd.Flags().BoolVarP(&cmdData.AllocateTty, "tty", "t", common.GetBoolEnvironmentDefaultFalse("WERF_TTY"), "Allocate a TTY (default $WERF_TTY or false if not specified)") + + return cmd +} + +func processArgs(cmd *cobra.Command, args []string) error { + doubleDashInd := cmd.ArgsLenAtDash() + doubleDashExist := cmd.ArgsLenAtDash() != -1 + + if doubleDashExist { + if doubleDashInd == len(args) { + return fmt.Errorf("unsupported position args format") + } + + switch doubleDashInd { + case 0: + cmdData.Command = args[doubleDashInd:] + case 1: + cmdData.ImageName = args[0] + cmdData.Command = args[doubleDashInd:] + default: + return fmt.Errorf("unsupported position args format") + } + } else { + switch len(args) { + case 0: + case 1: + cmdData.ImageName = args[0] + default: + return fmt.Errorf("unsupported position args format") + } + } + + return nil +} + +func runMain(ctx context.Context) error { + global_warnings.PostponeMultiwerfNotUpToDateWarning() + + if err := werf.Init(*commonCmdData.TmpDir, *commonCmdData.HomeDir); err != nil { + return fmt.Errorf("initialization error: %s", err) + } + + containerRuntime, processCtx, err := common.InitProcessContainerRuntime(ctx, &commonCmdData) + if err != nil { + return err + } + ctx = processCtx + + gitDataManager, err := gitdata.GetHostGitDataManager(ctx) + if err != nil { + return fmt.Errorf("error getting host git data manager: %s", err) + } + + if err := git_repo.Init(gitDataManager); err != nil { + return err + } + + if err := image.Init(); err != nil { + return err + } + + if err := lrumeta.Init(); err != nil { + return err + } + + if err := true_git.Init(ctx, true_git.Options{LiveGitOutput: *commonCmdData.LogVerbose || *commonCmdData.LogDebug}); err != nil { + return err + } + + if err := common.DockerRegistryInit(ctx, &commonCmdData); err != nil { + return err + } + + giterminismManager, err := common.GetGiterminismManager(ctx, &commonCmdData) + if err != nil { + return err + } + + common.ProcessLogProjectDir(&commonCmdData, giterminismManager.ProjectDir()) + + if err := ssh_agent.Init(ctx, common.GetSSHKey(&commonCmdData)); err != nil { + return fmt.Errorf("cannot initialize ssh agent: %s", err) + } + defer func() { + if err := ssh_agent.Terminate(); err != nil { + logboek.Context(ctx).Warn().LogF("WARNING: ssh agent termination failed: %s\n", err) + } + }() + + var pod string + if cmdData.Pod == "" { + pod = fmt.Sprintf("werf-run-%d", rand.Int()) + } else { + pod = cmdData.Pod + } + + _, werfConfig, err := common.GetRequiredWerfConfig(ctx, &commonCmdData, giterminismManager, common.GetWerfConfigOptions(&commonCmdData, false)) + if err != nil { + return fmt.Errorf("unable to load werf config: %s", err) + } + + common.SetupOndemandKubeInitializer(*commonCmdData.KubeContext, *commonCmdData.KubeConfig, *commonCmdData.KubeConfigBase64, *commonCmdData.KubeConfigPathMergeList) + if err := common.GetOndemandKubeInitializer().Init(ctx); err != nil { + return err + } + + namespace, err := deploy_params.GetKubernetesNamespace(*commonCmdData.Namespace, *commonCmdData.Environment, werfConfig) + if err != nil { + return err + } + + defer func() { + cleanupResources(ctx, pod, namespace) + }() + + if *commonCmdData.Follow { + return common.FollowGitHead(ctx, &commonCmdData, func(ctx context.Context, headCommitGiterminismManager giterminism_manager.Interface) error { + cleanupResources(ctx, pod, namespace) + + if err := run(ctx, pod, namespace, werfConfig, containerRuntime, giterminismManager); err != nil { + return err + } + + cleanupResources(ctx, pod, namespace) + + return nil + }) + } else { + if err := run(ctx, pod, namespace, werfConfig, containerRuntime, giterminismManager); err != nil { + return err + } + } + + return nil +} + +func run(ctx context.Context, pod string, namespace string, werfConfig *config.WerfConfig, containerRuntime container_runtime.ContainerRuntime, giterminismManager giterminism_manager.Interface) error { + projectName := werfConfig.Meta.Project + + projectTmpDir, err := tmp_manager.CreateProjectDir(ctx) + if err != nil { + return fmt.Errorf("getting project tmp dir failed: %s", err) + } + defer tmp_manager.ReleaseProjectDir(projectTmpDir) + + imageName := cmdData.ImageName + if imageName == "" && len(werfConfig.GetAllImages()) == 1 { + imageName = werfConfig.GetAllImages()[0].GetName() + } + + if !werfConfig.HasImage(imageName) { + return fmt.Errorf("image %q is not defined in werf.yaml", logging.ImageLogName(imageName, false)) + } + + stagesStorageAddress, err := common.GetStagesStorageAddress(&commonCmdData) + if err != nil { + return err + } + stagesStorage, err := common.GetStagesStorage(stagesStorageAddress, containerRuntime, &commonCmdData) + if err != nil { + return err + } + finalStagesStorage, err := common.GetOptionalFinalStagesStorage(containerRuntime, &commonCmdData) + if err != nil { + return err + } + synchronization, err := common.GetSynchronization(ctx, &commonCmdData, projectName, stagesStorage) + if err != nil { + return err + } + storageLockManager, err := common.GetStorageLockManager(ctx, synchronization) + if err != nil { + return err + } + secondaryStagesStorageList, err := common.GetSecondaryStagesStorageList(stagesStorage, containerRuntime, &commonCmdData) + if err != nil { + return err + } + cacheStagesStorageList, err := common.GetCacheStagesStorageList(containerRuntime, &commonCmdData) + if err != nil { + return err + } + + storageManager := manager.NewStorageManager(projectName, stagesStorage, finalStagesStorage, secondaryStagesStorageList, cacheStagesStorageList, storageLockManager) + + logboek.Context(ctx).Info().LogOptionalLn() + + conveyorWithRetry := build.NewConveyorWithRetryWrapper(werfConfig, giterminismManager, []string{imageName}, giterminismManager.ProjectDir(), projectTmpDir, ssh_agent.SSHAuthSock, containerRuntime, storageManager, storageLockManager, common.GetConveyorOptions(&commonCmdData)) + defer conveyorWithRetry.Terminate() + + var image string + if err := conveyorWithRetry.WithRetryBlock(ctx, func(c *build.Conveyor) error { + if *commonCmdData.SkipBuild { + if err := c.ShouldBeBuilt(ctx, build.ShouldBeBuiltOptions{}); err != nil { + return err + } + } else { + if err := c.Build(ctx, build.BuildOptions{}); err != nil { + return err + } + } + + if err := c.FetchLastImageStage(ctx, imageName); err != nil { + return err + } + + image = c.GetImageNameForLastImageStage(imageName) + return nil + }); err != nil { + return err + } + + args := []string{ + "kubectl", + "run", + "--namespace", namespace, + pod, + "--image", image, + "--command", + "--restart", "Never", + "--quiet", + "--attach", + } + + if cmdData.Interactive { + args = append(args, "-i") + } + + if cmdData.AllocateTty { + args = append(args, "-t") + } + + if cmdData.Overrides != "" { + args = append(args, "--overrides", cmdData.Overrides) + } + + if cmdData.ExtraOptions != "" { + args = append(args, strings.Fields(cmdData.ExtraOptions)...) + } + + if len(cmdData.Command) > 0 { + args = append(args, "--") + args = append(args, cmdData.Command...) + } + + if *commonCmdData.DryRun { + fmt.Printf("werf %s\n", strings.Join(args, " ")) + return nil + } + + if err := createNamespace(ctx, namespace); err != nil { + return fmt.Errorf("unable to create namespace: %w", err) + } + + return logboek.Streams().DoErrorWithoutProxyStreamDataFormatting(func() error { + return common.WithoutTerminationSignalsTrap(func() error { + logboek.Context(ctx).LogF("Running pod %q in namespace %q ...\n", pod, namespace) + + cmd := exec.Command(os.Args[0], args...) + cmd.Stdout = os.Stdout + cmd.Stderr = os.Stdin + cmd.Stdin = os.Stdin + + if err := cmd.Run(); err != nil { + return fmt.Errorf("error running pod: %w", err) + } + + return nil + }) + }) +} + +func cleanupResources(ctx context.Context, pod string, namespace string) { + if isNsExist, err := isNamespaceExist(ctx, namespace); err != nil { + logboek.Context(ctx).Warn().LogF("WARNING: unable to check for namespace existence: %s\n", err) + return + } else if !isNsExist { + return + } + + if cmdData.Rm { + if isPodExist, err := isPodExist(ctx, pod, namespace); err != nil { + logboek.Context(ctx).Warn().LogF("WARNING: unable to check for pod existence: %s\n", err) + } else if isPodExist { + logboek.Context(ctx).LogF("Cleaning up pod %q ...\n", pod) + if err := kube.Client.CoreV1().Pods(namespace).Delete(ctx, pod, v1.DeleteOptions{}); err != nil { + logboek.Context(ctx).Warn().LogF("WARNING: pod cleaning up failed: %s\n", err) + } + } + } + + if cmdData.RmWithNamespace { + logboek.Context(ctx).LogF("Cleaning up namespace %q ...\n", namespace) + if err := kube.Client.CoreV1().Namespaces().Delete(ctx, namespace, v1.DeleteOptions{}); err != nil { + logboek.Context(ctx).Warn().LogF("WARNING: namespace cleaning up failed: %s\n", err) + } + } +} + +func createNamespace(ctx context.Context, namespace string) error { + if isNsExist, err := isNamespaceExist(ctx, namespace); err != nil { + return fmt.Errorf("unable to check for namespace existence: %w", err) + } else if isNsExist { + return nil + } + + logboek.Context(ctx).LogF("Creating namespace %q ...\n", namespace) + + kube.Client.CoreV1().Namespaces().Create( + ctx, + &corev1.Namespace{ + ObjectMeta: v1.ObjectMeta{ + Name: namespace, + }, + }, + v1.CreateOptions{}, + ) + + return nil +} + +func isNamespaceExist(ctx context.Context, namespace string) (bool, error) { + if matchedNamespaces, err := kube.Client.CoreV1().Namespaces().List(ctx, v1.ListOptions{ + FieldSelector: fields.OneTermEqualSelector("metadata.name", namespace).String(), + }); err != nil { + return false, fmt.Errorf("unable to list namespaces: %w", err) + } else if len(matchedNamespaces.Items) > 0 { + return true, nil + } + + return false, nil +} + +func isPodExist(ctx context.Context, pod string, namespace string) (bool, error) { + if matchedPods, err := kube.Client.CoreV1().Pods(namespace).List(ctx, v1.ListOptions{ + FieldSelector: fields.OneTermEqualSelector("metadata.name", pod).String(), + }); err != nil { + return false, fmt.Errorf("unable to list pods: %w", err) + } else if len(matchedPods.Items) > 0 { + return true, nil + } + + return false, nil +} diff --git a/cmd/werf/main.go b/cmd/werf/main.go index 09f993a971..bd66d64816 100644 --- a/cmd/werf/main.go +++ b/cmd/werf/main.go @@ -34,6 +34,7 @@ import ( "github.com/werf/werf/cmd/werf/helm" host_cleanup "github.com/werf/werf/cmd/werf/host/cleanup" host_purge "github.com/werf/werf/cmd/werf/host/purge" + "github.com/werf/werf/cmd/werf/kube_run" "github.com/werf/werf/cmd/werf/kubectl" managed_images_add "github.com/werf/werf/cmd/werf/managed_images/add" managed_images_ls "github.com/werf/werf/cmd/werf/managed_images/ls" @@ -111,6 +112,7 @@ Find more information at https://werf.io`), build.NewCmd(), export.NewExportCmd(), run.NewCmd(), + kube_run.NewCmd(), dockerComposeCmd(), slugify.NewCmd(), render.NewCmd(), From ebdf08ba3561d8baa1c4f0cf193cf246c3205adf Mon Sep 17 00:00:00 2001 From: Ilya Lesikov Date: Fri, 18 Mar 2022 21:42:30 +0300 Subject: [PATCH 4/6] chore: update go.sum Signed-off-by: Ilya Lesikov --- go.sum | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/go.sum b/go.sum index 18963a3719..fbbc273b33 100644 --- a/go.sum +++ b/go.sum @@ -582,6 +582,7 @@ github.com/davecgh/go-spew v0.0.0-20151105211317-5215b55f46b2/go.mod h1:J7Y8YcW2 github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/daviddengcn/go-colortext v0.0.0-20160507010035-511bcaf42ccd h1:uVsMphB1eRx7xB1njzL3fuMdWRN8HtVzoUOItHMwv5c= github.com/daviddengcn/go-colortext v0.0.0-20160507010035-511bcaf42ccd/go.mod h1:dv4zxwHi5C/8AeI+4gX4dCWOIvNi7I6JCSX0HvlKPgE= github.com/dchest/siphash v1.2.1/go.mod h1:q+IRvb2gOSrUnYoPqHiyHXS0FOBBOdl6tONBlVnOnt4= github.com/denisenkom/go-mssqldb v0.0.0-20191124224453-732737034ffd/go.mod h1:xbL0rPBG9cCiLr28tMa8zpbdarY27NDyej4t/EjAShU= @@ -690,6 +691,7 @@ github.com/evanphx/json-patch v4.12.0+incompatible h1:4onqiflcdA9EOZ4RxV643DvftH github.com/evanphx/json-patch v4.12.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/exponent-io/jsonpath v0.0.0-20151013193312-d6023ce2651d h1:105gxyaGwCFad8crR9dcMQWvV9Hvulu6hwUh4tWPJnM= github.com/exponent-io/jsonpath v0.0.0-20151013193312-d6023ce2651d/go.mod h1:ZZMPRZwes7CROmyNKgQzC3XPs6L/G2EJLHddWejkmf4= +github.com/fatih/camelcase v1.0.0 h1:hxNvNX/xYBp0ovncs8WyWZrOrpBNub/JfaMvbURyft8= github.com/fatih/camelcase v1.0.0/go.mod h1:yN2Sb0lFhZJUdVvtELVWefmrXpuZESvPmqwoZc+/fpc= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= @@ -982,8 +984,11 @@ github.com/golangci/prealloc v0.0.0-20180630174525-215b22d4de21/go.mod h1:tf5+bz github.com/golangci/revgrep v0.0.0-20180526074752-d9c87f5ffaf0/go.mod h1:qOQCunEYvmd/TLamH+7LlVccLvUH5kZNhbCgTHoBbp4= github.com/golangci/revgrep v0.0.0-20180812185044-276a5c0a1039/go.mod h1:qOQCunEYvmd/TLamH+7LlVccLvUH5kZNhbCgTHoBbp4= github.com/golangci/unconvert v0.0.0-20180507085042-28b1c447d1f4/go.mod h1:Izgrg8RkN3rCIMLGE9CyYmU9pY2Jer6DgANEnZ/L/cQ= +github.com/golangplus/bytes v0.0.0-20160111154220-45c989fe5450 h1:7xqw01UYS+KCI25bMrPxwNYkSns2Db1ziQPpVq99FpE= github.com/golangplus/bytes v0.0.0-20160111154220-45c989fe5450/go.mod h1:Bk6SMAONeMXrxql8uvOKuAZSu8aM5RUGv+1C6IJaEho= +github.com/golangplus/fmt v0.0.0-20150411045040-2a5d6d7d2995 h1:f5gsjBiF9tRRVomCvrkGMMWI8W1f2OBFar2c5oakAP0= github.com/golangplus/fmt v0.0.0-20150411045040-2a5d6d7d2995/go.mod h1:lJgMEyOkYFkPcDKwRXegd+iM6E7matEszMG5HhwytU8= +github.com/golangplus/testing v0.0.0-20180327235837-af21d9c3145e h1:KhcknUwkWHKZPbFy2P7jH5LKJ3La+0ZeknkkmrSgqb0= github.com/golangplus/testing v0.0.0-20180327235837-af21d9c3145e/go.mod h1:0AA//k/eakGydO4jKRoRL2j92ZKSzTgj9tclaCrvXHk= github.com/gomodule/redigo v1.8.2/go.mod h1:P9dn9mFrCBvWhGE1wpxx6fgq7BAeLBk+UUUzlpkBYO0= github.com/gomodule/redigo v1.8.3 h1:HR0kYDX2RJZvAup8CsiJwxB4dTCSC0AaUq6S4SiLwUc= @@ -1268,6 +1273,7 @@ github.com/jmoiron/sqlx v1.3.4/go.mod h1:2BljVx/86SuTyjE+aPYlHCTNvZrnJXghYGpNiXL github.com/joefitzgerald/rainbow-reporter v0.1.0/go.mod h1:481CNgqmVHQZzdIbN52CupLJyoVwB10FQ/IQlF1pdL8= github.com/joho/godotenv v1.3.0/go.mod h1:7hK45KPybAkOC6peb+G5yklZfMxEjkZhHbwpqxOKXbg= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= +github.com/jonboulle/clockwork v0.2.2 h1:UOGuzwb1PwsrDAObMuhUnj0p5ULPj8V/xJ7Kx9qUBdQ= github.com/jonboulle/clockwork v0.2.2/go.mod h1:Pkfl5aHPm1nk2H9h0bjmnJD/BcgbGXUBGnn1kMkgxc8= github.com/josharian/intern v1.0.0 h1:vlS4z54oSdjm0bgjRigI+G1HpF+tI+9rE5LLzOg8HmY= github.com/josharian/intern v1.0.0/go.mod h1:5DoeVV0s6jJacbCEi61lwdGj/aVlrQvzHFFd8Hwg//Y= @@ -1361,6 +1367,7 @@ github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de/go.mod h1:zAbeS9 github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= github.com/linuxkit/virtsock v0.0.0-20201010232012-f8cee7dfc7a3/go.mod h1:3r6x7q95whyfWQpmGZTu3gk3v2YkMi05HEzl7Tf7YEo= +github.com/lithammer/dedent v1.1.0 h1:VNzHMVCBNG1j0fh3OrsFRkVUwStdDArbgBWoPAffktY= github.com/lithammer/dedent v1.1.0/go.mod h1:jrXYCQtgg0nJiN+StA2KgR7w6CiQNv9Fd/Z9BP0jIOc= github.com/logrusorgru/aurora v0.0.0-20181002194514-a7b3b318ed4e/go.mod h1:7rIyQOR62GCctdiQpZ/zOJlFyk6y+94wXzv6RNZgaR4= github.com/lyft/protoc-gen-star v0.5.3/go.mod h1:V0xaHgaf5oCCqmcxYcWiDfTiKsZsRc87/1qhoTACD8w= @@ -1537,6 +1544,7 @@ github.com/mvdan/xurls v1.1.0 h1:OpuDelGQ1R1ueQ6sSryzi6P+1RtBpfQHM8fJwlE45ww= github.com/mvdan/xurls v1.1.0/go.mod h1:tQlNn3BED8bE/15hnSL2HLkDeLWpNPAwtw7wkEq44oU= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= +github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f h1:y5//uYreIhSUg3J1GEMiLbxo1LJaP8RfCpH6pymGZus= github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f/go.mod h1:ZdcZmHo+o7JKHSa8/e818NopupXU1YMK5fe1lsApnBw= github.com/nakabonne/nestif v0.3.0/go.mod h1:dI314BppzXjJ4HsCnbo7XzrJHPszZsjnk5wEBSYHI2c= github.com/nats-io/jwt v0.3.0/go.mod h1:fRYCDE99xlTsqUzISS1Bi75UBJ6ljOJQOAAu5VglpSg= @@ -2963,6 +2971,7 @@ k8s.io/component-base v0.20.4/go.mod h1:t4p9EdiagbVCJKrQ1RsA5/V4rFQNDfRlevJajlGw k8s.io/component-base v0.20.6/go.mod h1:6f1MPBAeI+mvuts3sIdtpjljHWBQ2cIy38oBIWMYnrM= k8s.io/component-base v0.23.1 h1:j/BqdZUWeWKCy2v/jcgnOJAzpRYWSbGcjGVYICko8Uc= k8s.io/component-base v0.23.1/go.mod h1:6llmap8QtJIXGDd4uIWJhAq0Op8AtQo6bDW2RrNMTeo= +k8s.io/component-helpers v0.23.1 h1:Xrtj0LwXUqYyTPvN2bOE2UcqURX+uSBmKX1koNGhVxI= k8s.io/component-helpers v0.23.1/go.mod h1:ZK24U+2oXnBPcas2KolLigVVN9g5zOzaHLkHiQMFGr0= k8s.io/cri-api v0.17.3/go.mod h1:X1sbHmuXhwaHs9xxYffLqJogVsnI+f6cPRcgPel7ywM= k8s.io/cri-api v0.20.1/go.mod h1:2JRbKt+BFLTjtrILYVqQK5jqhI+XNdF6UiGMgczeBCI= @@ -3002,6 +3011,7 @@ k8s.io/kubernetes v1.11.10/go.mod h1:ocZa8+6APFNC2tX1DZASIbocyYT5jHzqFVsY5aoB7Jk k8s.io/kubernetes v1.13.0/go.mod h1:ocZa8+6APFNC2tX1DZASIbocyYT5jHzqFVsY5aoB7Jk= k8s.io/legacy-cloud-providers v0.17.4/go.mod h1:FikRNoD64ECjkxO36gkDgJeiQWwyZTuBkhu+yxOc1Js= k8s.io/metrics v0.18.6/go.mod h1:iAwGeabusQNO3duHDM7BBExTUB8L+iq8PM7N9EtQw6g= +k8s.io/metrics v0.23.1 h1:ZKrRdjarB/JPl4nPef7SlMjAUUVzU5XdSKgT+cm6bFA= k8s.io/metrics v0.23.1/go.mod h1:qXvsM1KANrc+ZZeFwj6Phvf0NLiC+d3RwcsLcdGc+xs= k8s.io/utils v0.0.0-20190801114015-581e00157fb1/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= k8s.io/utils v0.0.0-20191114184206-e782cd3c129f/go.mod h1:sZAwmy6armz5eXlNoLmJcl4F1QuKu7sr+mFQ0byX7Ew= @@ -3043,6 +3053,7 @@ sigs.k8s.io/kustomize v2.0.3+incompatible/go.mod h1:MkjgH3RdOWrievjo6c9T245dYlB5 sigs.k8s.io/kustomize/api v0.10.1 h1:KgU7hfYoscuqag84kxtzKdEC3mKMb99DPI3a0eaV1d0= sigs.k8s.io/kustomize/api v0.10.1/go.mod h1:2FigT1QN6xKdcnGS2Ppp1uIWrtWN28Ms8A3OZUZhwr8= sigs.k8s.io/kustomize/cmd/config v0.10.2/go.mod h1:K2aW7nXJ0AaT+VA/eO0/dzFLxmpFcTzudmAgDwPY1HQ= +sigs.k8s.io/kustomize/kustomize/v4 v4.4.1 h1:6hgMEo3Gt0XmhDt4vo0FJ0LRDMc4i8JC6SUW24D4hQM= sigs.k8s.io/kustomize/kustomize/v4 v4.4.1/go.mod h1:qOKJMMz2mBP+vcS7vK+mNz4HBLjaQSWRY22EF6Tb7Io= sigs.k8s.io/kustomize/kyaml v0.13.0 h1:9c+ETyNfSrVhxvphs+K2dzT3dh5oVPPEqPOE/cUpScY= sigs.k8s.io/kustomize/kyaml v0.13.0/go.mod h1:FTJxEZ86ScK184NpGSAQcfEqee0nul8oLCK30D47m4E= From bb1a4ffd27cd96fe330d231ff121c15612409f69 Mon Sep 17 00:00:00 2001 From: Ilya Lesikov Date: Fri, 18 Mar 2022 21:47:12 +0300 Subject: [PATCH 5/6] test: new command `werf kube-run`, refactor Signed-off-by: Ilya Lesikov --- test/e2e/build/build_test.go | 8 +- test/e2e/kube-run/_fixtures/state0/werf.yaml | 6 ++ test/e2e/kube-run/kube_run_test.go | 76 ++++++++++++++ test/e2e/kube-run/suite_test.go | 29 ++++++ test/pkg/werf/project.go | 104 +++++++++++++++++-- 5 files changed, 209 insertions(+), 14 deletions(-) create mode 100644 test/e2e/kube-run/_fixtures/state0/werf.yaml create mode 100644 test/e2e/kube-run/kube_run_test.go create mode 100644 test/e2e/kube-run/suite_test.go diff --git a/test/e2e/build/build_test.go b/test/e2e/build/build_test.go index 4dfbcff6f2..956c7e7bc7 100644 --- a/test/e2e/build/build_test.go +++ b/test/e2e/build/build_test.go @@ -35,12 +35,12 @@ var _ = Describe("Build", func() { By("state0: building images") werfProject := werf.NewProject(SuiteData.WerfBinPath, SuiteData.GetTestRepoPath(repoDirname)) - buildOut, buildReport := werfProject.BuildWithReport(SuiteData.GetBuildReportPath(buildReportName)) + buildOut, buildReport := werfProject.BuildWithReport(SuiteData.GetBuildReportPath(buildReportName), nil) Expect(buildOut).To(ContainSubstring("Building stage")) Expect(buildOut).NotTo(ContainSubstring("Use cache image")) By("state0: rebuilding same images") - Expect(werfProject.Build()).To(And( + Expect(werfProject.Build(nil)).To(And( ContainSubstring("Use cache image"), Not(ContainSubstring("Building stage")), )) @@ -90,11 +90,11 @@ var _ = Describe("Build", func() { By("state1: building images") werfProject := werf.NewProject(SuiteData.WerfBinPath, SuiteData.GetTestRepoPath(repoDirname)) - buildOut, buildReport := werfProject.BuildWithReport(SuiteData.GetBuildReportPath(buildReportName)) + buildOut, buildReport := werfProject.BuildWithReport(SuiteData.GetBuildReportPath(buildReportName), nil) Expect(buildOut).To(ContainSubstring("Building stage")) By("state1: rebuilding same images") - Expect(werfProject.Build()).To(And( + Expect(werfProject.Build(nil)).To(And( ContainSubstring("Use cache image"), Not(ContainSubstring("Building stage")), )) diff --git a/test/e2e/kube-run/_fixtures/state0/werf.yaml b/test/e2e/kube-run/_fixtures/state0/werf.yaml new file mode 100644 index 0000000000..966e68daa3 --- /dev/null +++ b/test/e2e/kube-run/_fixtures/state0/werf.yaml @@ -0,0 +1,6 @@ +project: werf-e2e-kube-run-test +configVersion: 1 + +--- +image: main +from: alpine:3 diff --git a/test/e2e/kube-run/kube_run_test.go b/test/e2e/kube-run/kube_run_test.go new file mode 100644 index 0000000000..5daa6f90d6 --- /dev/null +++ b/test/e2e/kube-run/kube_run_test.go @@ -0,0 +1,76 @@ +package e2e_kube_run_test + +import ( + . "github.com/onsi/ginkgo" + . "github.com/onsi/ginkgo/extensions/table" + . "github.com/onsi/gomega" + + "github.com/werf/werf/test/pkg/werf" +) + +var _ = Describe("kube-run", func() { + DescribeTable("should succeed/fail and produce expected output", + func(kubeRunOpts *werf.KubeRunOptions, outputExpectationsFunc func(out string)) { + repoDirname := "repo0" + fixtureRelPath := "state0" + + By("preparing test repo") + SuiteData.InitTestRepo(repoDirname, fixtureRelPath) + werfProject := werf.NewProject(SuiteData.WerfBinPath, SuiteData.GetTestRepoPath(repoDirname)) + + By("execute kube-run") + combinedOut := werfProject.KubeRun(kubeRunOpts) + outputExpectationsFunc(combinedOut) + }, + Entry( + "show output and succeed, running non-interactively", + &werf.KubeRunOptions{ + Command: `sh -c "cat /etc/os-release"`, + Image: "main", + }, + func(out string) { + Expect(out).To(ContainSubstring("ID=alpine")) + }, + ), + Entry( + "show output and succeed, running interactively with TTY", + &werf.KubeRunOptions{ + Command: `sh -c "cat /etc/os-release"`, + Image: "main", + CommonOptions: werf.CommonOptions{ + ExtraArgs: []string{"-i", "-t"}, + }, + }, + func(out string) { + Expect(out).To(ContainSubstring("ID=alpine")) + }, + ), + Entry( + "show output and fail, running non-interactively", + &werf.KubeRunOptions{ + Command: `sh -c "cat /etc/os-release; exit 1"`, + Image: "main", + CommonOptions: werf.CommonOptions{ + ShouldFail: true, + }, + }, + func(out string) { + Expect(out).To(ContainSubstring("ID=alpine")) + }, + ), + Entry( + "show output and fail, running interactively with TTY", + &werf.KubeRunOptions{ + Command: `sh -c "cat /etc/os-release; exit 1"`, + Image: "main", + CommonOptions: werf.CommonOptions{ + ShouldFail: true, + ExtraArgs: []string{"-i", "-t"}, + }, + }, + func(out string) { + Expect(out).To(ContainSubstring("ID=alpine")) + }, + ), + ) +}) diff --git a/test/e2e/kube-run/suite_test.go b/test/e2e/kube-run/suite_test.go new file mode 100644 index 0000000000..f0aa97ed72 --- /dev/null +++ b/test/e2e/kube-run/suite_test.go @@ -0,0 +1,29 @@ +package e2e_kube_run_test + +import ( + "testing" + + "github.com/werf/werf/test/pkg/suite_init" +) + +func TestSuite(t *testing.T) { + suite_init.MakeTestSuiteEntrypointFunc("E2E kube-run suite", suite_init.TestSuiteEntrypointFuncOptions{ + RequiredSuiteTools: []string{"docker", "git"}, + RequiredSuiteEnvs: []string{ + "WERF_TEST_K8S_DOCKER_REGISTRY", + "WERF_TEST_K8S_DOCKER_REGISTRY_USERNAME", + "WERF_TEST_K8S_DOCKER_REGISTRY_PASSWORD", + }, + })(t) +} + +var SuiteData suite_init.SuiteData + +var ( + _ = SuiteData.SetupStubs(suite_init.NewStubsData()) + _ = SuiteData.SetupSynchronizedSuiteCallbacks(suite_init.NewSynchronizedSuiteCallbacksData()) + _ = SuiteData.SetupWerfBinary(suite_init.NewWerfBinaryData(SuiteData.SynchronizedSuiteCallbacksData)) + _ = SuiteData.SetupProjectName(suite_init.NewProjectNameData(SuiteData.StubsData)) + _ = SuiteData.SetupTmp(suite_init.NewTmpDirData()) + _ = SuiteData.SetupK8sDockerRegistry(suite_init.NewK8sDockerRegistryData(SuiteData.ProjectNameData, SuiteData.StubsData)) +) diff --git a/test/pkg/werf/project.go b/test/pkg/werf/project.go index 1f7e15646e..1e8b8dec7d 100644 --- a/test/pkg/werf/project.go +++ b/test/pkg/werf/project.go @@ -10,30 +10,114 @@ import ( iutils "github.com/werf/werf/test/pkg/utils" ) -func NewProject(werfBinPath, repoPath string) *Project { +func NewProject(werfBinPath, gitRepoPath string) *Project { return &Project{ WerfBinPath: werfBinPath, - RepoPath: repoPath, + GitRepoPath: gitRepoPath, } } type Project struct { - RepoPath string + GitRepoPath string WerfBinPath string } -func (p *Project) Build(optArgs ...string) (combinedOut string) { - optArgs = append([]string{"build", "--debug"}, optArgs...) - return iutils.SucceedCommandOutputString(p.RepoPath, p.WerfBinPath, optArgs...) +type CommonOptions struct { + ShouldFail bool + ExtraArgs []string } -func (p *Project) BuildWithReport(buildReportPath string, optsArgs ...string) (combinedOut string, buildReport build.ImagesReport) { - optsArgs = append([]string{"build", "--debug", "--report-path", buildReportPath}, optsArgs...) - combinedOut = iutils.SucceedCommandOutputString(p.RepoPath, p.WerfBinPath, optsArgs...) +type BuildOptions struct { + CommonOptions +} + +type BuildWithReportOptions struct { + CommonOptions +} + +type KubeRunOptions struct { + CommonOptions + Command string + Image string +} + +type KubeCtlOptions struct { + CommonOptions +} + +type runCommandOptions struct { + ShouldFail bool + Args []string +} + +func (p *Project) Build(opts *BuildOptions) (combinedOut string) { + if opts == nil { + opts = &BuildOptions{} + } + + args := append([]string{"build"}, opts.ExtraArgs...) + outb, err := iutils.RunCommand(p.GitRepoPath, p.WerfBinPath, args...) + if opts.ShouldFail { + Expect(err).To(HaveOccurred()) + } else { + Expect(err).NotTo(HaveOccurred()) + } + + return string(outb) +} + +func (p *Project) BuildWithReport(buildReportPath string, opts *BuildWithReportOptions) (string, build.ImagesReport) { + if opts == nil { + opts = &BuildWithReportOptions{} + } + + args := append([]string{"build", "--report-path", buildReportPath}, opts.ExtraArgs...) + out := p.runCommand(runCommandOptions{Args: args, ShouldFail: opts.ShouldFail}) buildReportRaw, err := os.ReadFile(buildReportPath) Expect(err).NotTo(HaveOccurred()) + + var buildReport build.ImagesReport Expect(json.Unmarshal(buildReportRaw, &buildReport)).To(Succeed()) - return combinedOut, buildReport + return out, buildReport +} + +func (p *Project) KubeRun(opts *KubeRunOptions) string { + if opts == nil { + opts = &KubeRunOptions{} + } + + args := append([]string{"kube-run"}, opts.ExtraArgs...) + + if opts.Image != "" { + args = append(args, opts.Image) + } + + if opts.Command != "" { + args = append(args, "--", opts.Command) + } + + return p.runCommand(runCommandOptions{Args: args, ShouldFail: opts.ShouldFail}) +} + +func (p *Project) KubeCtl(opts *KubeCtlOptions) string { + if opts == nil { + opts = &KubeCtlOptions{} + } + + args := append([]string{"kubectl"}, opts.ExtraArgs...) + + return p.runCommand(runCommandOptions{Args: args, ShouldFail: opts.ShouldFail}) +} + +func (p *Project) runCommand(opts runCommandOptions) string { + outb, err := iutils.RunCommand(p.GitRepoPath, p.WerfBinPath, opts.Args...) + if opts.ShouldFail { + Expect(err).To(HaveOccurred()) + } else { + Expect(err).NotTo(HaveOccurred()) + } + + return string(outb) } From 057314fee54fef237e72015ff198fdbe214a70cb Mon Sep 17 00:00:00 2001 From: Ilya Lesikov Date: Fri, 18 Mar 2022 21:52:11 +0300 Subject: [PATCH 6/6] docs: regen cli reference for `werf kubectl` and `werf kube-run` Signed-off-by: Ilya Lesikov --- docs/_data/sidebars/_cli.yml | 321 ++++++++++++++++++ docs/_data/sidebars/documentation.yml | 321 ++++++++++++++++++ docs/_includes/reference/cli/werf_kube_run.md | 209 ++++++++++++ .../reference/cli/werf_kube_run.short.md | 1 + docs/_includes/reference/cli/werf_kubectl.md | 72 ++++ .../reference/cli/werf_kubectl.short.md | 1 + .../reference/cli/werf_kubectl_alpha.md | 64 ++++ .../reference/cli/werf_kubectl_alpha.short.md | 1 + .../cli/werf_kubectl_alpha_events.md | 100 ++++++ .../cli/werf_kubectl_alpha_events.short.md | 1 + .../reference/cli/werf_kubectl_annotate.md | 151 ++++++++ .../cli/werf_kubectl_annotate.short.md | 1 + .../cli/werf_kubectl_api_resources.md | 114 +++++++ .../cli/werf_kubectl_api_resources.short.md | 1 + .../cli/werf_kubectl_api_versions.md | 77 +++++ .../cli/werf_kubectl_api_versions.short.md | 1 + .../reference/cli/werf_kubectl_apply.md | 163 +++++++++ .../reference/cli/werf_kubectl_apply.short.md | 1 + .../werf_kubectl_apply_edit_last_applied.md | 116 +++++++ ...f_kubectl_apply_edit_last_applied.short.md | 1 + .../werf_kubectl_apply_set_last_applied.md | 109 ++++++ ...rf_kubectl_apply_set_last_applied.short.md | 1 + .../werf_kubectl_apply_view_last_applied.md | 102 ++++++ ...f_kubectl_apply_view_last_applied.short.md | 1 + .../reference/cli/werf_kubectl_attach.md | 106 ++++++ .../cli/werf_kubectl_attach.short.md | 1 + .../reference/cli/werf_kubectl_auth.md | 70 ++++ .../reference/cli/werf_kubectl_auth.short.md | 1 + .../reference/cli/werf_kubectl_auth_can_i.md | 112 ++++++ .../cli/werf_kubectl_auth_can_i.short.md | 1 + .../cli/werf_kubectl_auth_reconcile.md | 117 +++++++ .../cli/werf_kubectl_auth_reconcile.short.md | 1 + .../reference/cli/werf_kubectl_autoscale.md | 127 +++++++ .../cli/werf_kubectl_autoscale.short.md | 1 + .../reference/cli/werf_kubectl_certificate.md | 70 ++++ .../cli/werf_kubectl_certificate.short.md | 1 + .../cli/werf_kubectl_certificate_approve.md | 107 ++++++ .../werf_kubectl_certificate_approve.short.md | 1 + .../cli/werf_kubectl_certificate_deny.md | 105 ++++++ .../werf_kubectl_certificate_deny.short.md | 1 + .../cli/werf_kubectl_cluster_info.md | 77 +++++ .../cli/werf_kubectl_cluster_info.short.md | 1 + .../cli/werf_kubectl_cluster_info_dump.md | 115 +++++++ .../werf_kubectl_cluster_info_dump.short.md | 1 + .../reference/cli/werf_kubectl_completion.md | 134 ++++++++ .../cli/werf_kubectl_completion.short.md | 1 + .../reference/cli/werf_kubectl_config.md | 76 +++++ .../cli/werf_kubectl_config.short.md | 1 + .../werf_kubectl_config_current_context.md | 77 +++++ ...rf_kubectl_config_current_context.short.md | 1 + .../cli/werf_kubectl_config_delete_cluster.md | 77 +++++ ...erf_kubectl_config_delete_cluster.short.md | 1 + .../cli/werf_kubectl_config_delete_context.md | 77 +++++ ...erf_kubectl_config_delete_context.short.md | 1 + .../cli/werf_kubectl_config_delete_user.md | 77 +++++ .../werf_kubectl_config_delete_user.short.md | 1 + .../cli/werf_kubectl_config_get_clusters.md | 77 +++++ .../werf_kubectl_config_get_clusters.short.md | 1 + .../cli/werf_kubectl_config_get_contexts.md | 90 +++++ .../werf_kubectl_config_get_contexts.short.md | 1 + .../cli/werf_kubectl_config_get_users.md | 77 +++++ .../werf_kubectl_config_get_users.short.md | 1 + .../cli/werf_kubectl_config_rename_context.md | 83 +++++ ...erf_kubectl_config_rename_context.short.md | 1 + .../reference/cli/werf_kubectl_config_set.md | 100 ++++++ .../cli/werf_kubectl_config_set.short.md | 1 + .../cli/werf_kubectl_config_set_cluster.md | 95 ++++++ .../werf_kubectl_config_set_cluster.short.md | 1 + .../cli/werf_kubectl_config_set_context.md | 86 +++++ .../werf_kubectl_config_set_context.short.md | 1 + .../werf_kubectl_config_set_credentials.md | 137 ++++++++ ...rf_kubectl_config_set_credentials.short.md | 1 + .../cli/werf_kubectl_config_unset.md | 82 +++++ .../cli/werf_kubectl_config_unset.short.md | 1 + .../cli/werf_kubectl_config_use_context.md | 77 +++++ .../werf_kubectl_config_use_context.short.md | 1 + .../reference/cli/werf_kubectl_config_view.md | 111 ++++++ .../cli/werf_kubectl_config_view.short.md | 1 + .../reference/cli/werf_kubectl_cordon.md | 88 +++++ .../cli/werf_kubectl_cordon.short.md | 1 + .../reference/cli/werf_kubectl_cp.md | 114 +++++++ .../reference/cli/werf_kubectl_cp.short.md | 1 + .../reference/cli/werf_kubectl_create.md | 130 +++++++ .../cli/werf_kubectl_create.short.md | 1 + .../cli/werf_kubectl_create_clusterrole.md | 131 +++++++ .../werf_kubectl_create_clusterrole.short.md | 1 + .../werf_kubectl_create_clusterrolebinding.md | 112 ++++++ ...kubectl_create_clusterrolebinding.short.md | 1 + .../cli/werf_kubectl_create_configmap.md | 136 ++++++++ .../werf_kubectl_create_configmap.short.md | 1 + .../cli/werf_kubectl_create_cronjob.md | 115 +++++++ .../cli/werf_kubectl_create_cronjob.short.md | 1 + .../cli/werf_kubectl_create_deployment.md | 121 +++++++ .../werf_kubectl_create_deployment.short.md | 1 + .../cli/werf_kubectl_create_ingress.md | 148 ++++++++ .../cli/werf_kubectl_create_ingress.short.md | 1 + .../reference/cli/werf_kubectl_create_job.md | 116 +++++++ .../cli/werf_kubectl_create_job.short.md | 1 + .../cli/werf_kubectl_create_namespace.md | 106 ++++++ .../werf_kubectl_create_namespace.short.md | 1 + ...werf_kubectl_create_poddisruptionbudget.md | 118 +++++++ ...ubectl_create_poddisruptionbudget.short.md | 1 + .../cli/werf_kubectl_create_priorityclass.md | 122 +++++++ ...werf_kubectl_create_priorityclass.short.md | 1 + .../cli/werf_kubectl_create_quota.md | 114 +++++++ .../cli/werf_kubectl_create_quota.short.md | 1 + .../reference/cli/werf_kubectl_create_role.md | 121 +++++++ .../cli/werf_kubectl_create_role.short.md | 1 + .../cli/werf_kubectl_create_rolebinding.md | 114 +++++++ .../werf_kubectl_create_rolebinding.short.md | 1 + .../cli/werf_kubectl_create_secret.md | 70 ++++ .../cli/werf_kubectl_create_secret.short.md | 1 + ...f_kubectl_create_secret_docker_registry.md | 135 ++++++++ ...ctl_create_secret_docker_registry.short.md | 1 + .../cli/werf_kubectl_create_secret_generic.md | 138 ++++++++ ...erf_kubectl_create_secret_generic.short.md | 1 + .../cli/werf_kubectl_create_secret_tls.md | 114 +++++++ .../werf_kubectl_create_secret_tls.short.md | 1 + .../cli/werf_kubectl_create_service.md | 70 ++++ .../cli/werf_kubectl_create_service.short.md | 1 + .../werf_kubectl_create_service_clusterip.md | 113 ++++++ ..._kubectl_create_service_clusterip.short.md | 1 + ...erf_kubectl_create_service_externalname.md | 112 ++++++ ...bectl_create_service_externalname.short.md | 1 + ...erf_kubectl_create_service_loadbalancer.md | 108 ++++++ ...bectl_create_service_loadbalancer.short.md | 1 + .../werf_kubectl_create_service_nodeport.md | 110 ++++++ ...f_kubectl_create_service_nodeport.short.md | 1 + .../cli/werf_kubectl_create_serviceaccount.md | 106 ++++++ ...erf_kubectl_create_serviceaccount.short.md | 1 + .../reference/cli/werf_kubectl_debug.md | 146 ++++++++ .../reference/cli/werf_kubectl_debug.short.md | 1 + .../reference/cli/werf_kubectl_delete.md | 159 +++++++++ .../cli/werf_kubectl_delete.short.md | 1 + .../reference/cli/werf_kubectl_describe.md | 124 +++++++ .../cli/werf_kubectl_describe.short.md | 1 + .../reference/cli/werf_kubectl_diff.md | 111 ++++++ .../reference/cli/werf_kubectl_diff.short.md | 1 + .../reference/cli/werf_kubectl_drain.md | 123 +++++++ .../reference/cli/werf_kubectl_drain.short.md | 1 + .../reference/cli/werf_kubectl_edit.md | 132 +++++++ .../reference/cli/werf_kubectl_edit.short.md | 1 + .../reference/cli/werf_kubectl_exec.md | 117 +++++++ .../reference/cli/werf_kubectl_exec.short.md | 1 + .../reference/cli/werf_kubectl_explain.md | 97 ++++++ .../cli/werf_kubectl_explain.short.md | 1 + .../reference/cli/werf_kubectl_expose.md | 176 ++++++++++ .../cli/werf_kubectl_expose.short.md | 1 + .../reference/cli/werf_kubectl_get.md | 183 ++++++++++ .../reference/cli/werf_kubectl_get.short.md | 1 + .../reference/cli/werf_kubectl_kustomize.md | 114 +++++++ .../cli/werf_kubectl_kustomize.short.md | 1 + .../reference/cli/werf_kubectl_label.md | 149 ++++++++ .../reference/cli/werf_kubectl_label.short.md | 1 + .../reference/cli/werf_kubectl_logs.md | 150 ++++++++ .../reference/cli/werf_kubectl_logs.short.md | 1 + .../reference/cli/werf_kubectl_options.md | 77 +++++ .../cli/werf_kubectl_options.short.md | 1 + .../reference/cli/werf_kubectl_patch.md | 129 +++++++ .../reference/cli/werf_kubectl_patch.short.md | 1 + .../reference/cli/werf_kubectl_plugin.md | 74 ++++ .../cli/werf_kubectl_plugin.short.md | 1 + .../reference/cli/werf_kubectl_plugin_list.md | 79 +++++ .../cli/werf_kubectl_plugin_list.short.md | 1 + .../cli/werf_kubectl_port_forward.md | 111 ++++++ .../cli/werf_kubectl_port_forward.short.md | 1 + .../reference/cli/werf_kubectl_proxy.md | 132 +++++++ .../reference/cli/werf_kubectl_proxy.short.md | 1 + .../reference/cli/werf_kubectl_replace.md | 145 ++++++++ .../cli/werf_kubectl_replace.short.md | 1 + .../reference/cli/werf_kubectl_rollout.md | 86 +++++ .../cli/werf_kubectl_rollout.short.md | 1 + .../cli/werf_kubectl_rollout_history.md | 106 ++++++ .../cli/werf_kubectl_rollout_history.short.md | 1 + .../cli/werf_kubectl_rollout_pause.md | 107 ++++++ .../cli/werf_kubectl_rollout_pause.short.md | 1 + .../cli/werf_kubectl_rollout_restart.md | 108 ++++++ .../cli/werf_kubectl_rollout_restart.short.md | 1 + .../cli/werf_kubectl_rollout_resume.md | 105 ++++++ .../cli/werf_kubectl_rollout_resume.short.md | 1 + .../cli/werf_kubectl_rollout_status.md | 98 ++++++ .../cli/werf_kubectl_rollout_status.short.md | 1 + .../cli/werf_kubectl_rollout_undo.md | 113 ++++++ .../cli/werf_kubectl_rollout_undo.short.md | 1 + .../reference/cli/werf_kubectl_run.md | 200 +++++++++++ .../reference/cli/werf_kubectl_run.short.md | 1 + .../reference/cli/werf_kubectl_scale.md | 137 ++++++++ .../reference/cli/werf_kubectl_scale.short.md | 1 + .../reference/cli/werf_kubectl_set.md | 72 ++++ .../reference/cli/werf_kubectl_set.short.md | 1 + .../reference/cli/werf_kubectl_set_env.md | 170 ++++++++++ .../cli/werf_kubectl_set_env.short.md | 1 + .../reference/cli/werf_kubectl_set_image.md | 127 +++++++ .../cli/werf_kubectl_set_image.short.md | 1 + .../cli/werf_kubectl_set_resources.md | 138 ++++++++ .../cli/werf_kubectl_set_resources.short.md | 1 + .../cli/werf_kubectl_set_selector.md | 115 +++++++ .../cli/werf_kubectl_set_selector.short.md | 1 + .../cli/werf_kubectl_set_serviceaccount.md | 118 +++++++ .../werf_kubectl_set_serviceaccount.short.md | 1 + .../reference/cli/werf_kubectl_set_subject.md | 124 +++++++ .../cli/werf_kubectl_set_subject.short.md | 1 + .../reference/cli/werf_kubectl_taint.md | 130 +++++++ .../reference/cli/werf_kubectl_taint.short.md | 1 + .../reference/cli/werf_kubectl_top.md | 74 ++++ .../reference/cli/werf_kubectl_top.short.md | 1 + .../reference/cli/werf_kubectl_top_node.md | 99 ++++++ .../cli/werf_kubectl_top_node.short.md | 1 + .../reference/cli/werf_kubectl_top_pod.md | 114 +++++++ .../cli/werf_kubectl_top_pod.short.md | 1 + .../reference/cli/werf_kubectl_uncordon.md | 88 +++++ .../cli/werf_kubectl_uncordon.short.md | 1 + .../reference/cli/werf_kubectl_version.md | 88 +++++ .../cli/werf_kubectl_version.short.md | 1 + .../reference/cli/werf_kubectl_wait.md | 136 ++++++++ .../reference/cli/werf_kubectl_wait.short.md | 1 + docs/pages_en/reference/cli/overview.md | 2 + docs/pages_en/reference/cli/werf_kube_run.md | 6 + docs/pages_en/reference/cli/werf_kubectl.md | 6 + .../reference/cli/werf_kubectl_alpha.md | 6 + .../cli/werf_kubectl_alpha_events.md | 6 + .../reference/cli/werf_kubectl_annotate.md | 6 + .../cli/werf_kubectl_api_resources.md | 6 + .../cli/werf_kubectl_api_versions.md | 6 + .../reference/cli/werf_kubectl_apply.md | 6 + .../werf_kubectl_apply_edit_last_applied.md | 6 + .../werf_kubectl_apply_set_last_applied.md | 6 + .../werf_kubectl_apply_view_last_applied.md | 6 + .../reference/cli/werf_kubectl_attach.md | 6 + .../reference/cli/werf_kubectl_auth.md | 6 + .../reference/cli/werf_kubectl_auth_can_i.md | 6 + .../cli/werf_kubectl_auth_reconcile.md | 6 + .../reference/cli/werf_kubectl_autoscale.md | 6 + .../reference/cli/werf_kubectl_certificate.md | 6 + .../cli/werf_kubectl_certificate_approve.md | 6 + .../cli/werf_kubectl_certificate_deny.md | 6 + .../cli/werf_kubectl_cluster_info.md | 6 + .../cli/werf_kubectl_cluster_info_dump.md | 6 + .../reference/cli/werf_kubectl_completion.md | 6 + .../reference/cli/werf_kubectl_config.md | 6 + .../werf_kubectl_config_current_context.md | 6 + .../cli/werf_kubectl_config_delete_cluster.md | 6 + .../cli/werf_kubectl_config_delete_context.md | 6 + .../cli/werf_kubectl_config_delete_user.md | 6 + .../cli/werf_kubectl_config_get_clusters.md | 6 + .../cli/werf_kubectl_config_get_contexts.md | 6 + .../cli/werf_kubectl_config_get_users.md | 6 + .../cli/werf_kubectl_config_rename_context.md | 6 + .../reference/cli/werf_kubectl_config_set.md | 6 + .../cli/werf_kubectl_config_set_cluster.md | 6 + .../cli/werf_kubectl_config_set_context.md | 6 + .../werf_kubectl_config_set_credentials.md | 6 + .../cli/werf_kubectl_config_unset.md | 6 + .../cli/werf_kubectl_config_use_context.md | 6 + .../reference/cli/werf_kubectl_config_view.md | 6 + .../reference/cli/werf_kubectl_cordon.md | 6 + .../pages_en/reference/cli/werf_kubectl_cp.md | 6 + .../reference/cli/werf_kubectl_create.md | 6 + .../cli/werf_kubectl_create_clusterrole.md | 6 + .../werf_kubectl_create_clusterrolebinding.md | 6 + .../cli/werf_kubectl_create_configmap.md | 6 + .../cli/werf_kubectl_create_cronjob.md | 6 + .../cli/werf_kubectl_create_deployment.md | 6 + .../cli/werf_kubectl_create_ingress.md | 6 + .../reference/cli/werf_kubectl_create_job.md | 6 + .../cli/werf_kubectl_create_namespace.md | 6 + ...werf_kubectl_create_poddisruptionbudget.md | 6 + .../cli/werf_kubectl_create_priorityclass.md | 6 + .../cli/werf_kubectl_create_quota.md | 6 + .../reference/cli/werf_kubectl_create_role.md | 6 + .../cli/werf_kubectl_create_rolebinding.md | 6 + .../cli/werf_kubectl_create_secret.md | 6 + ...f_kubectl_create_secret_docker_registry.md | 6 + .../cli/werf_kubectl_create_secret_generic.md | 6 + .../cli/werf_kubectl_create_secret_tls.md | 6 + .../cli/werf_kubectl_create_service.md | 6 + .../werf_kubectl_create_service_clusterip.md | 6 + ...erf_kubectl_create_service_externalname.md | 6 + ...erf_kubectl_create_service_loadbalancer.md | 6 + .../werf_kubectl_create_service_nodeport.md | 6 + .../cli/werf_kubectl_create_serviceaccount.md | 6 + .../reference/cli/werf_kubectl_debug.md | 6 + .../reference/cli/werf_kubectl_delete.md | 6 + .../reference/cli/werf_kubectl_describe.md | 6 + .../reference/cli/werf_kubectl_diff.md | 6 + .../reference/cli/werf_kubectl_drain.md | 6 + .../reference/cli/werf_kubectl_edit.md | 6 + .../reference/cli/werf_kubectl_exec.md | 6 + .../reference/cli/werf_kubectl_explain.md | 6 + .../reference/cli/werf_kubectl_expose.md | 6 + .../reference/cli/werf_kubectl_get.md | 6 + .../reference/cli/werf_kubectl_kustomize.md | 6 + .../reference/cli/werf_kubectl_label.md | 6 + .../reference/cli/werf_kubectl_logs.md | 6 + .../reference/cli/werf_kubectl_options.md | 6 + .../reference/cli/werf_kubectl_patch.md | 6 + .../reference/cli/werf_kubectl_plugin.md | 6 + .../reference/cli/werf_kubectl_plugin_list.md | 6 + .../cli/werf_kubectl_port_forward.md | 6 + .../reference/cli/werf_kubectl_proxy.md | 6 + .../reference/cli/werf_kubectl_replace.md | 6 + .../reference/cli/werf_kubectl_rollout.md | 6 + .../cli/werf_kubectl_rollout_history.md | 6 + .../cli/werf_kubectl_rollout_pause.md | 6 + .../cli/werf_kubectl_rollout_restart.md | 6 + .../cli/werf_kubectl_rollout_resume.md | 6 + .../cli/werf_kubectl_rollout_status.md | 6 + .../cli/werf_kubectl_rollout_undo.md | 6 + .../reference/cli/werf_kubectl_run.md | 6 + .../reference/cli/werf_kubectl_scale.md | 6 + .../reference/cli/werf_kubectl_set.md | 6 + .../reference/cli/werf_kubectl_set_env.md | 6 + .../reference/cli/werf_kubectl_set_image.md | 6 + .../cli/werf_kubectl_set_resources.md | 6 + .../cli/werf_kubectl_set_selector.md | 6 + .../cli/werf_kubectl_set_serviceaccount.md | 6 + .../reference/cli/werf_kubectl_set_subject.md | 6 + .../reference/cli/werf_kubectl_taint.md | 6 + .../reference/cli/werf_kubectl_top.md | 6 + .../reference/cli/werf_kubectl_top_node.md | 6 + .../reference/cli/werf_kubectl_top_pod.md | 6 + .../reference/cli/werf_kubectl_uncordon.md | 6 + .../reference/cli/werf_kubectl_version.md | 6 + .../reference/cli/werf_kubectl_wait.md | 6 + 324 files changed, 13372 insertions(+) create mode 100644 docs/_includes/reference/cli/werf_kube_run.md create mode 100644 docs/_includes/reference/cli/werf_kube_run.short.md create mode 100644 docs/_includes/reference/cli/werf_kubectl.md create mode 100644 docs/_includes/reference/cli/werf_kubectl.short.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_alpha.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_alpha.short.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_alpha_events.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_alpha_events.short.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_annotate.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_annotate.short.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_api_resources.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_api_resources.short.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_api_versions.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_api_versions.short.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_apply.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_apply.short.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_apply_edit_last_applied.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_apply_edit_last_applied.short.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_apply_set_last_applied.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_apply_set_last_applied.short.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_apply_view_last_applied.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_apply_view_last_applied.short.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_attach.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_attach.short.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_auth.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_auth.short.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_auth_can_i.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_auth_can_i.short.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_auth_reconcile.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_auth_reconcile.short.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_autoscale.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_autoscale.short.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_certificate.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_certificate.short.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_certificate_approve.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_certificate_approve.short.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_certificate_deny.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_certificate_deny.short.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_cluster_info.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_cluster_info.short.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_cluster_info_dump.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_cluster_info_dump.short.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_completion.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_completion.short.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_config.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_config.short.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_config_current_context.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_config_current_context.short.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_config_delete_cluster.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_config_delete_cluster.short.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_config_delete_context.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_config_delete_context.short.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_config_delete_user.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_config_delete_user.short.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_config_get_clusters.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_config_get_clusters.short.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_config_get_contexts.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_config_get_contexts.short.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_config_get_users.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_config_get_users.short.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_config_rename_context.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_config_rename_context.short.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_config_set.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_config_set.short.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_config_set_cluster.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_config_set_cluster.short.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_config_set_context.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_config_set_context.short.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_config_set_credentials.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_config_set_credentials.short.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_config_unset.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_config_unset.short.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_config_use_context.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_config_use_context.short.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_config_view.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_config_view.short.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_cordon.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_cordon.short.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_cp.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_cp.short.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_create.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_create.short.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_create_clusterrole.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_create_clusterrole.short.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_create_clusterrolebinding.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_create_clusterrolebinding.short.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_create_configmap.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_create_configmap.short.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_create_cronjob.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_create_cronjob.short.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_create_deployment.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_create_deployment.short.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_create_ingress.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_create_ingress.short.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_create_job.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_create_job.short.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_create_namespace.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_create_namespace.short.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_create_poddisruptionbudget.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_create_poddisruptionbudget.short.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_create_priorityclass.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_create_priorityclass.short.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_create_quota.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_create_quota.short.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_create_role.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_create_role.short.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_create_rolebinding.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_create_rolebinding.short.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_create_secret.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_create_secret.short.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_create_secret_docker_registry.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_create_secret_docker_registry.short.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_create_secret_generic.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_create_secret_generic.short.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_create_secret_tls.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_create_secret_tls.short.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_create_service.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_create_service.short.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_create_service_clusterip.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_create_service_clusterip.short.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_create_service_externalname.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_create_service_externalname.short.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_create_service_loadbalancer.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_create_service_loadbalancer.short.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_create_service_nodeport.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_create_service_nodeport.short.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_create_serviceaccount.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_create_serviceaccount.short.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_debug.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_debug.short.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_delete.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_delete.short.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_describe.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_describe.short.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_diff.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_diff.short.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_drain.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_drain.short.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_edit.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_edit.short.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_exec.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_exec.short.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_explain.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_explain.short.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_expose.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_expose.short.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_get.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_get.short.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_kustomize.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_kustomize.short.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_label.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_label.short.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_logs.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_logs.short.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_options.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_options.short.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_patch.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_patch.short.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_plugin.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_plugin.short.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_plugin_list.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_plugin_list.short.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_port_forward.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_port_forward.short.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_proxy.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_proxy.short.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_replace.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_replace.short.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_rollout.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_rollout.short.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_rollout_history.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_rollout_history.short.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_rollout_pause.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_rollout_pause.short.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_rollout_restart.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_rollout_restart.short.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_rollout_resume.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_rollout_resume.short.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_rollout_status.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_rollout_status.short.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_rollout_undo.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_rollout_undo.short.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_run.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_run.short.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_scale.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_scale.short.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_set.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_set.short.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_set_env.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_set_env.short.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_set_image.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_set_image.short.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_set_resources.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_set_resources.short.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_set_selector.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_set_selector.short.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_set_serviceaccount.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_set_serviceaccount.short.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_set_subject.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_set_subject.short.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_taint.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_taint.short.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_top.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_top.short.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_top_node.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_top_node.short.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_top_pod.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_top_pod.short.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_uncordon.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_uncordon.short.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_version.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_version.short.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_wait.md create mode 100644 docs/_includes/reference/cli/werf_kubectl_wait.short.md create mode 100644 docs/pages_en/reference/cli/werf_kube_run.md create mode 100644 docs/pages_en/reference/cli/werf_kubectl.md create mode 100644 docs/pages_en/reference/cli/werf_kubectl_alpha.md create mode 100644 docs/pages_en/reference/cli/werf_kubectl_alpha_events.md create mode 100644 docs/pages_en/reference/cli/werf_kubectl_annotate.md create mode 100644 docs/pages_en/reference/cli/werf_kubectl_api_resources.md create mode 100644 docs/pages_en/reference/cli/werf_kubectl_api_versions.md create mode 100644 docs/pages_en/reference/cli/werf_kubectl_apply.md create mode 100644 docs/pages_en/reference/cli/werf_kubectl_apply_edit_last_applied.md create mode 100644 docs/pages_en/reference/cli/werf_kubectl_apply_set_last_applied.md create mode 100644 docs/pages_en/reference/cli/werf_kubectl_apply_view_last_applied.md create mode 100644 docs/pages_en/reference/cli/werf_kubectl_attach.md create mode 100644 docs/pages_en/reference/cli/werf_kubectl_auth.md create mode 100644 docs/pages_en/reference/cli/werf_kubectl_auth_can_i.md create mode 100644 docs/pages_en/reference/cli/werf_kubectl_auth_reconcile.md create mode 100644 docs/pages_en/reference/cli/werf_kubectl_autoscale.md create mode 100644 docs/pages_en/reference/cli/werf_kubectl_certificate.md create mode 100644 docs/pages_en/reference/cli/werf_kubectl_certificate_approve.md create mode 100644 docs/pages_en/reference/cli/werf_kubectl_certificate_deny.md create mode 100644 docs/pages_en/reference/cli/werf_kubectl_cluster_info.md create mode 100644 docs/pages_en/reference/cli/werf_kubectl_cluster_info_dump.md create mode 100644 docs/pages_en/reference/cli/werf_kubectl_completion.md create mode 100644 docs/pages_en/reference/cli/werf_kubectl_config.md create mode 100644 docs/pages_en/reference/cli/werf_kubectl_config_current_context.md create mode 100644 docs/pages_en/reference/cli/werf_kubectl_config_delete_cluster.md create mode 100644 docs/pages_en/reference/cli/werf_kubectl_config_delete_context.md create mode 100644 docs/pages_en/reference/cli/werf_kubectl_config_delete_user.md create mode 100644 docs/pages_en/reference/cli/werf_kubectl_config_get_clusters.md create mode 100644 docs/pages_en/reference/cli/werf_kubectl_config_get_contexts.md create mode 100644 docs/pages_en/reference/cli/werf_kubectl_config_get_users.md create mode 100644 docs/pages_en/reference/cli/werf_kubectl_config_rename_context.md create mode 100644 docs/pages_en/reference/cli/werf_kubectl_config_set.md create mode 100644 docs/pages_en/reference/cli/werf_kubectl_config_set_cluster.md create mode 100644 docs/pages_en/reference/cli/werf_kubectl_config_set_context.md create mode 100644 docs/pages_en/reference/cli/werf_kubectl_config_set_credentials.md create mode 100644 docs/pages_en/reference/cli/werf_kubectl_config_unset.md create mode 100644 docs/pages_en/reference/cli/werf_kubectl_config_use_context.md create mode 100644 docs/pages_en/reference/cli/werf_kubectl_config_view.md create mode 100644 docs/pages_en/reference/cli/werf_kubectl_cordon.md create mode 100644 docs/pages_en/reference/cli/werf_kubectl_cp.md create mode 100644 docs/pages_en/reference/cli/werf_kubectl_create.md create mode 100644 docs/pages_en/reference/cli/werf_kubectl_create_clusterrole.md create mode 100644 docs/pages_en/reference/cli/werf_kubectl_create_clusterrolebinding.md create mode 100644 docs/pages_en/reference/cli/werf_kubectl_create_configmap.md create mode 100644 docs/pages_en/reference/cli/werf_kubectl_create_cronjob.md create mode 100644 docs/pages_en/reference/cli/werf_kubectl_create_deployment.md create mode 100644 docs/pages_en/reference/cli/werf_kubectl_create_ingress.md create mode 100644 docs/pages_en/reference/cli/werf_kubectl_create_job.md create mode 100644 docs/pages_en/reference/cli/werf_kubectl_create_namespace.md create mode 100644 docs/pages_en/reference/cli/werf_kubectl_create_poddisruptionbudget.md create mode 100644 docs/pages_en/reference/cli/werf_kubectl_create_priorityclass.md create mode 100644 docs/pages_en/reference/cli/werf_kubectl_create_quota.md create mode 100644 docs/pages_en/reference/cli/werf_kubectl_create_role.md create mode 100644 docs/pages_en/reference/cli/werf_kubectl_create_rolebinding.md create mode 100644 docs/pages_en/reference/cli/werf_kubectl_create_secret.md create mode 100644 docs/pages_en/reference/cli/werf_kubectl_create_secret_docker_registry.md create mode 100644 docs/pages_en/reference/cli/werf_kubectl_create_secret_generic.md create mode 100644 docs/pages_en/reference/cli/werf_kubectl_create_secret_tls.md create mode 100644 docs/pages_en/reference/cli/werf_kubectl_create_service.md create mode 100644 docs/pages_en/reference/cli/werf_kubectl_create_service_clusterip.md create mode 100644 docs/pages_en/reference/cli/werf_kubectl_create_service_externalname.md create mode 100644 docs/pages_en/reference/cli/werf_kubectl_create_service_loadbalancer.md create mode 100644 docs/pages_en/reference/cli/werf_kubectl_create_service_nodeport.md create mode 100644 docs/pages_en/reference/cli/werf_kubectl_create_serviceaccount.md create mode 100644 docs/pages_en/reference/cli/werf_kubectl_debug.md create mode 100644 docs/pages_en/reference/cli/werf_kubectl_delete.md create mode 100644 docs/pages_en/reference/cli/werf_kubectl_describe.md create mode 100644 docs/pages_en/reference/cli/werf_kubectl_diff.md create mode 100644 docs/pages_en/reference/cli/werf_kubectl_drain.md create mode 100644 docs/pages_en/reference/cli/werf_kubectl_edit.md create mode 100644 docs/pages_en/reference/cli/werf_kubectl_exec.md create mode 100644 docs/pages_en/reference/cli/werf_kubectl_explain.md create mode 100644 docs/pages_en/reference/cli/werf_kubectl_expose.md create mode 100644 docs/pages_en/reference/cli/werf_kubectl_get.md create mode 100644 docs/pages_en/reference/cli/werf_kubectl_kustomize.md create mode 100644 docs/pages_en/reference/cli/werf_kubectl_label.md create mode 100644 docs/pages_en/reference/cli/werf_kubectl_logs.md create mode 100644 docs/pages_en/reference/cli/werf_kubectl_options.md create mode 100644 docs/pages_en/reference/cli/werf_kubectl_patch.md create mode 100644 docs/pages_en/reference/cli/werf_kubectl_plugin.md create mode 100644 docs/pages_en/reference/cli/werf_kubectl_plugin_list.md create mode 100644 docs/pages_en/reference/cli/werf_kubectl_port_forward.md create mode 100644 docs/pages_en/reference/cli/werf_kubectl_proxy.md create mode 100644 docs/pages_en/reference/cli/werf_kubectl_replace.md create mode 100644 docs/pages_en/reference/cli/werf_kubectl_rollout.md create mode 100644 docs/pages_en/reference/cli/werf_kubectl_rollout_history.md create mode 100644 docs/pages_en/reference/cli/werf_kubectl_rollout_pause.md create mode 100644 docs/pages_en/reference/cli/werf_kubectl_rollout_restart.md create mode 100644 docs/pages_en/reference/cli/werf_kubectl_rollout_resume.md create mode 100644 docs/pages_en/reference/cli/werf_kubectl_rollout_status.md create mode 100644 docs/pages_en/reference/cli/werf_kubectl_rollout_undo.md create mode 100644 docs/pages_en/reference/cli/werf_kubectl_run.md create mode 100644 docs/pages_en/reference/cli/werf_kubectl_scale.md create mode 100644 docs/pages_en/reference/cli/werf_kubectl_set.md create mode 100644 docs/pages_en/reference/cli/werf_kubectl_set_env.md create mode 100644 docs/pages_en/reference/cli/werf_kubectl_set_image.md create mode 100644 docs/pages_en/reference/cli/werf_kubectl_set_resources.md create mode 100644 docs/pages_en/reference/cli/werf_kubectl_set_selector.md create mode 100644 docs/pages_en/reference/cli/werf_kubectl_set_serviceaccount.md create mode 100644 docs/pages_en/reference/cli/werf_kubectl_set_subject.md create mode 100644 docs/pages_en/reference/cli/werf_kubectl_taint.md create mode 100644 docs/pages_en/reference/cli/werf_kubectl_top.md create mode 100644 docs/pages_en/reference/cli/werf_kubectl_top_node.md create mode 100644 docs/pages_en/reference/cli/werf_kubectl_top_pod.md create mode 100644 docs/pages_en/reference/cli/werf_kubectl_uncordon.md create mode 100644 docs/pages_en/reference/cli/werf_kubectl_version.md create mode 100644 docs/pages_en/reference/cli/werf_kubectl_wait.md diff --git a/docs/_data/sidebars/_cli.yml b/docs/_data/sidebars/_cli.yml index 9ccc217cbb..e35bd279ea 100644 --- a/docs/_data/sidebars/_cli.yml +++ b/docs/_data/sidebars/_cli.yml @@ -57,6 +57,9 @@ cli: &cli - title: werf run url: /reference/cli/werf_run.html + - title: werf kube-run + url: /reference/cli/werf_kube_run.html + - title: werf compose f: @@ -324,6 +327,324 @@ cli: &cli - title: werf cr logout url: /reference/cli/werf_cr_logout.html + - title: werf kubectl + f: + + - title: werf kubectl alpha + f: + + - title: werf kubectl alpha events + url: /reference/cli/werf_kubectl_alpha_events.html + + - title: werf kubectl annotate + url: /reference/cli/werf_kubectl_annotate.html + + - title: werf kubectl api-resources + url: /reference/cli/werf_kubectl_api_resources.html + + - title: werf kubectl api-versions + url: /reference/cli/werf_kubectl_api_versions.html + + - title: werf kubectl apply + f: + + - title: werf kubectl apply edit-last-applied + url: /reference/cli/werf_kubectl_apply_edit_last_applied.html + + - title: werf kubectl apply set-last-applied + url: /reference/cli/werf_kubectl_apply_set_last_applied.html + + - title: werf kubectl apply view-last-applied + url: /reference/cli/werf_kubectl_apply_view_last_applied.html + + - title: werf kubectl attach + url: /reference/cli/werf_kubectl_attach.html + + - title: werf kubectl auth + f: + + - title: werf kubectl auth can-i + url: /reference/cli/werf_kubectl_auth_can_i.html + + - title: werf kubectl auth reconcile + url: /reference/cli/werf_kubectl_auth_reconcile.html + + - title: werf kubectl autoscale + url: /reference/cli/werf_kubectl_autoscale.html + + - title: werf kubectl certificate + f: + + - title: werf kubectl certificate approve + url: /reference/cli/werf_kubectl_certificate_approve.html + + - title: werf kubectl certificate deny + url: /reference/cli/werf_kubectl_certificate_deny.html + + - title: werf kubectl cluster-info + f: + + - title: werf kubectl cluster-info dump + url: /reference/cli/werf_kubectl_cluster_info_dump.html + + - title: werf kubectl completion + url: /reference/cli/werf_kubectl_completion.html + + - title: werf kubectl config + f: + + - title: werf kubectl config current-context + url: /reference/cli/werf_kubectl_config_current_context.html + + - title: werf kubectl config delete-cluster + url: /reference/cli/werf_kubectl_config_delete_cluster.html + + - title: werf kubectl config delete-context + url: /reference/cli/werf_kubectl_config_delete_context.html + + - title: werf kubectl config delete-user + url: /reference/cli/werf_kubectl_config_delete_user.html + + - title: werf kubectl config get-clusters + url: /reference/cli/werf_kubectl_config_get_clusters.html + + - title: werf kubectl config get-contexts + url: /reference/cli/werf_kubectl_config_get_contexts.html + + - title: werf kubectl config get-users + url: /reference/cli/werf_kubectl_config_get_users.html + + - title: werf kubectl config rename-context + url: /reference/cli/werf_kubectl_config_rename_context.html + + - title: werf kubectl config set + url: /reference/cli/werf_kubectl_config_set.html + + - title: werf kubectl config set-cluster + url: /reference/cli/werf_kubectl_config_set_cluster.html + + - title: werf kubectl config set-context + url: /reference/cli/werf_kubectl_config_set_context.html + + - title: werf kubectl config set-credentials + url: /reference/cli/werf_kubectl_config_set_credentials.html + + - title: werf kubectl config unset + url: /reference/cli/werf_kubectl_config_unset.html + + - title: werf kubectl config use-context + url: /reference/cli/werf_kubectl_config_use_context.html + + - title: werf kubectl config view + url: /reference/cli/werf_kubectl_config_view.html + + - title: werf kubectl cordon + url: /reference/cli/werf_kubectl_cordon.html + + - title: werf kubectl cp + url: /reference/cli/werf_kubectl_cp.html + + - title: werf kubectl create + f: + + - title: werf kubectl create clusterrole + url: /reference/cli/werf_kubectl_create_clusterrole.html + + - title: werf kubectl create clusterrolebinding + url: /reference/cli/werf_kubectl_create_clusterrolebinding.html + + - title: werf kubectl create configmap + url: /reference/cli/werf_kubectl_create_configmap.html + + - title: werf kubectl create cronjob + url: /reference/cli/werf_kubectl_create_cronjob.html + + - title: werf kubectl create deployment + url: /reference/cli/werf_kubectl_create_deployment.html + + - title: werf kubectl create ingress + url: /reference/cli/werf_kubectl_create_ingress.html + + - title: werf kubectl create job + url: /reference/cli/werf_kubectl_create_job.html + + - title: werf kubectl create namespace + url: /reference/cli/werf_kubectl_create_namespace.html + + - title: werf kubectl create poddisruptionbudget + url: /reference/cli/werf_kubectl_create_poddisruptionbudget.html + + - title: werf kubectl create priorityclass + url: /reference/cli/werf_kubectl_create_priorityclass.html + + - title: werf kubectl create quota + url: /reference/cli/werf_kubectl_create_quota.html + + - title: werf kubectl create role + url: /reference/cli/werf_kubectl_create_role.html + + - title: werf kubectl create rolebinding + url: /reference/cli/werf_kubectl_create_rolebinding.html + + - title: werf kubectl create secret + f: + + - title: werf kubectl create secret docker-registry + url: /reference/cli/werf_kubectl_create_secret_docker_registry.html + + - title: werf kubectl create secret generic + url: /reference/cli/werf_kubectl_create_secret_generic.html + + - title: werf kubectl create secret tls + url: /reference/cli/werf_kubectl_create_secret_tls.html + + - title: werf kubectl create service + f: + + - title: werf kubectl create service clusterip + url: /reference/cli/werf_kubectl_create_service_clusterip.html + + - title: werf kubectl create service externalname + url: /reference/cli/werf_kubectl_create_service_externalname.html + + - title: werf kubectl create service loadbalancer + url: /reference/cli/werf_kubectl_create_service_loadbalancer.html + + - title: werf kubectl create service nodeport + url: /reference/cli/werf_kubectl_create_service_nodeport.html + + - title: werf kubectl create serviceaccount + url: /reference/cli/werf_kubectl_create_serviceaccount.html + + - title: werf kubectl debug + url: /reference/cli/werf_kubectl_debug.html + + - title: werf kubectl delete + url: /reference/cli/werf_kubectl_delete.html + + - title: werf kubectl describe + url: /reference/cli/werf_kubectl_describe.html + + - title: werf kubectl diff + url: /reference/cli/werf_kubectl_diff.html + + - title: werf kubectl drain + url: /reference/cli/werf_kubectl_drain.html + + - title: werf kubectl edit + url: /reference/cli/werf_kubectl_edit.html + + - title: werf kubectl exec + url: /reference/cli/werf_kubectl_exec.html + + - title: werf kubectl explain + url: /reference/cli/werf_kubectl_explain.html + + - title: werf kubectl expose + url: /reference/cli/werf_kubectl_expose.html + + - title: werf kubectl get + url: /reference/cli/werf_kubectl_get.html + + - title: werf kubectl kustomize + url: /reference/cli/werf_kubectl_kustomize.html + + - title: werf kubectl label + url: /reference/cli/werf_kubectl_label.html + + - title: werf kubectl logs + url: /reference/cli/werf_kubectl_logs.html + + - title: werf kubectl options + url: /reference/cli/werf_kubectl_options.html + + - title: werf kubectl patch + url: /reference/cli/werf_kubectl_patch.html + + - title: werf kubectl plugin + f: + + - title: werf kubectl plugin list + url: /reference/cli/werf_kubectl_plugin_list.html + + - title: werf kubectl port-forward + url: /reference/cli/werf_kubectl_port_forward.html + + - title: werf kubectl proxy + url: /reference/cli/werf_kubectl_proxy.html + + - title: werf kubectl replace + url: /reference/cli/werf_kubectl_replace.html + + - title: werf kubectl rollout + f: + + - title: werf kubectl rollout history + url: /reference/cli/werf_kubectl_rollout_history.html + + - title: werf kubectl rollout pause + url: /reference/cli/werf_kubectl_rollout_pause.html + + - title: werf kubectl rollout restart + url: /reference/cli/werf_kubectl_rollout_restart.html + + - title: werf kubectl rollout resume + url: /reference/cli/werf_kubectl_rollout_resume.html + + - title: werf kubectl rollout status + url: /reference/cli/werf_kubectl_rollout_status.html + + - title: werf kubectl rollout undo + url: /reference/cli/werf_kubectl_rollout_undo.html + + - title: werf kubectl run + url: /reference/cli/werf_kubectl_run.html + + - title: werf kubectl scale + url: /reference/cli/werf_kubectl_scale.html + + - title: werf kubectl set + f: + + - title: werf kubectl set env + url: /reference/cli/werf_kubectl_set_env.html + + - title: werf kubectl set image + url: /reference/cli/werf_kubectl_set_image.html + + - title: werf kubectl set resources + url: /reference/cli/werf_kubectl_set_resources.html + + - title: werf kubectl set selector + url: /reference/cli/werf_kubectl_set_selector.html + + - title: werf kubectl set serviceaccount + url: /reference/cli/werf_kubectl_set_serviceaccount.html + + - title: werf kubectl set subject + url: /reference/cli/werf_kubectl_set_subject.html + + - title: werf kubectl taint + url: /reference/cli/werf_kubectl_taint.html + + - title: werf kubectl top + f: + + - title: werf kubectl top node + url: /reference/cli/werf_kubectl_top_node.html + + - title: werf kubectl top pod + url: /reference/cli/werf_kubectl_top_pod.html + + - title: werf kubectl uncordon + url: /reference/cli/werf_kubectl_uncordon.html + + - title: werf kubectl version + url: /reference/cli/werf_kubectl_version.html + + - title: werf kubectl wait + url: /reference/cli/werf_kubectl_wait.html + - title: Other commands f: diff --git a/docs/_data/sidebars/documentation.yml b/docs/_data/sidebars/documentation.yml index 823c6c5340..fcb0b50022 100644 --- a/docs/_data/sidebars/documentation.yml +++ b/docs/_data/sidebars/documentation.yml @@ -62,6 +62,9 @@ cli: &cli - title: werf run url: /reference/cli/werf_run.html + - title: werf kube-run + url: /reference/cli/werf_kube_run.html + - title: werf compose f: @@ -329,6 +332,324 @@ cli: &cli - title: werf cr logout url: /reference/cli/werf_cr_logout.html + - title: werf kubectl + f: + + - title: werf kubectl alpha + f: + + - title: werf kubectl alpha events + url: /reference/cli/werf_kubectl_alpha_events.html + + - title: werf kubectl annotate + url: /reference/cli/werf_kubectl_annotate.html + + - title: werf kubectl api-resources + url: /reference/cli/werf_kubectl_api_resources.html + + - title: werf kubectl api-versions + url: /reference/cli/werf_kubectl_api_versions.html + + - title: werf kubectl apply + f: + + - title: werf kubectl apply edit-last-applied + url: /reference/cli/werf_kubectl_apply_edit_last_applied.html + + - title: werf kubectl apply set-last-applied + url: /reference/cli/werf_kubectl_apply_set_last_applied.html + + - title: werf kubectl apply view-last-applied + url: /reference/cli/werf_kubectl_apply_view_last_applied.html + + - title: werf kubectl attach + url: /reference/cli/werf_kubectl_attach.html + + - title: werf kubectl auth + f: + + - title: werf kubectl auth can-i + url: /reference/cli/werf_kubectl_auth_can_i.html + + - title: werf kubectl auth reconcile + url: /reference/cli/werf_kubectl_auth_reconcile.html + + - title: werf kubectl autoscale + url: /reference/cli/werf_kubectl_autoscale.html + + - title: werf kubectl certificate + f: + + - title: werf kubectl certificate approve + url: /reference/cli/werf_kubectl_certificate_approve.html + + - title: werf kubectl certificate deny + url: /reference/cli/werf_kubectl_certificate_deny.html + + - title: werf kubectl cluster-info + f: + + - title: werf kubectl cluster-info dump + url: /reference/cli/werf_kubectl_cluster_info_dump.html + + - title: werf kubectl completion + url: /reference/cli/werf_kubectl_completion.html + + - title: werf kubectl config + f: + + - title: werf kubectl config current-context + url: /reference/cli/werf_kubectl_config_current_context.html + + - title: werf kubectl config delete-cluster + url: /reference/cli/werf_kubectl_config_delete_cluster.html + + - title: werf kubectl config delete-context + url: /reference/cli/werf_kubectl_config_delete_context.html + + - title: werf kubectl config delete-user + url: /reference/cli/werf_kubectl_config_delete_user.html + + - title: werf kubectl config get-clusters + url: /reference/cli/werf_kubectl_config_get_clusters.html + + - title: werf kubectl config get-contexts + url: /reference/cli/werf_kubectl_config_get_contexts.html + + - title: werf kubectl config get-users + url: /reference/cli/werf_kubectl_config_get_users.html + + - title: werf kubectl config rename-context + url: /reference/cli/werf_kubectl_config_rename_context.html + + - title: werf kubectl config set + url: /reference/cli/werf_kubectl_config_set.html + + - title: werf kubectl config set-cluster + url: /reference/cli/werf_kubectl_config_set_cluster.html + + - title: werf kubectl config set-context + url: /reference/cli/werf_kubectl_config_set_context.html + + - title: werf kubectl config set-credentials + url: /reference/cli/werf_kubectl_config_set_credentials.html + + - title: werf kubectl config unset + url: /reference/cli/werf_kubectl_config_unset.html + + - title: werf kubectl config use-context + url: /reference/cli/werf_kubectl_config_use_context.html + + - title: werf kubectl config view + url: /reference/cli/werf_kubectl_config_view.html + + - title: werf kubectl cordon + url: /reference/cli/werf_kubectl_cordon.html + + - title: werf kubectl cp + url: /reference/cli/werf_kubectl_cp.html + + - title: werf kubectl create + f: + + - title: werf kubectl create clusterrole + url: /reference/cli/werf_kubectl_create_clusterrole.html + + - title: werf kubectl create clusterrolebinding + url: /reference/cli/werf_kubectl_create_clusterrolebinding.html + + - title: werf kubectl create configmap + url: /reference/cli/werf_kubectl_create_configmap.html + + - title: werf kubectl create cronjob + url: /reference/cli/werf_kubectl_create_cronjob.html + + - title: werf kubectl create deployment + url: /reference/cli/werf_kubectl_create_deployment.html + + - title: werf kubectl create ingress + url: /reference/cli/werf_kubectl_create_ingress.html + + - title: werf kubectl create job + url: /reference/cli/werf_kubectl_create_job.html + + - title: werf kubectl create namespace + url: /reference/cli/werf_kubectl_create_namespace.html + + - title: werf kubectl create poddisruptionbudget + url: /reference/cli/werf_kubectl_create_poddisruptionbudget.html + + - title: werf kubectl create priorityclass + url: /reference/cli/werf_kubectl_create_priorityclass.html + + - title: werf kubectl create quota + url: /reference/cli/werf_kubectl_create_quota.html + + - title: werf kubectl create role + url: /reference/cli/werf_kubectl_create_role.html + + - title: werf kubectl create rolebinding + url: /reference/cli/werf_kubectl_create_rolebinding.html + + - title: werf kubectl create secret + f: + + - title: werf kubectl create secret docker-registry + url: /reference/cli/werf_kubectl_create_secret_docker_registry.html + + - title: werf kubectl create secret generic + url: /reference/cli/werf_kubectl_create_secret_generic.html + + - title: werf kubectl create secret tls + url: /reference/cli/werf_kubectl_create_secret_tls.html + + - title: werf kubectl create service + f: + + - title: werf kubectl create service clusterip + url: /reference/cli/werf_kubectl_create_service_clusterip.html + + - title: werf kubectl create service externalname + url: /reference/cli/werf_kubectl_create_service_externalname.html + + - title: werf kubectl create service loadbalancer + url: /reference/cli/werf_kubectl_create_service_loadbalancer.html + + - title: werf kubectl create service nodeport + url: /reference/cli/werf_kubectl_create_service_nodeport.html + + - title: werf kubectl create serviceaccount + url: /reference/cli/werf_kubectl_create_serviceaccount.html + + - title: werf kubectl debug + url: /reference/cli/werf_kubectl_debug.html + + - title: werf kubectl delete + url: /reference/cli/werf_kubectl_delete.html + + - title: werf kubectl describe + url: /reference/cli/werf_kubectl_describe.html + + - title: werf kubectl diff + url: /reference/cli/werf_kubectl_diff.html + + - title: werf kubectl drain + url: /reference/cli/werf_kubectl_drain.html + + - title: werf kubectl edit + url: /reference/cli/werf_kubectl_edit.html + + - title: werf kubectl exec + url: /reference/cli/werf_kubectl_exec.html + + - title: werf kubectl explain + url: /reference/cli/werf_kubectl_explain.html + + - title: werf kubectl expose + url: /reference/cli/werf_kubectl_expose.html + + - title: werf kubectl get + url: /reference/cli/werf_kubectl_get.html + + - title: werf kubectl kustomize + url: /reference/cli/werf_kubectl_kustomize.html + + - title: werf kubectl label + url: /reference/cli/werf_kubectl_label.html + + - title: werf kubectl logs + url: /reference/cli/werf_kubectl_logs.html + + - title: werf kubectl options + url: /reference/cli/werf_kubectl_options.html + + - title: werf kubectl patch + url: /reference/cli/werf_kubectl_patch.html + + - title: werf kubectl plugin + f: + + - title: werf kubectl plugin list + url: /reference/cli/werf_kubectl_plugin_list.html + + - title: werf kubectl port-forward + url: /reference/cli/werf_kubectl_port_forward.html + + - title: werf kubectl proxy + url: /reference/cli/werf_kubectl_proxy.html + + - title: werf kubectl replace + url: /reference/cli/werf_kubectl_replace.html + + - title: werf kubectl rollout + f: + + - title: werf kubectl rollout history + url: /reference/cli/werf_kubectl_rollout_history.html + + - title: werf kubectl rollout pause + url: /reference/cli/werf_kubectl_rollout_pause.html + + - title: werf kubectl rollout restart + url: /reference/cli/werf_kubectl_rollout_restart.html + + - title: werf kubectl rollout resume + url: /reference/cli/werf_kubectl_rollout_resume.html + + - title: werf kubectl rollout status + url: /reference/cli/werf_kubectl_rollout_status.html + + - title: werf kubectl rollout undo + url: /reference/cli/werf_kubectl_rollout_undo.html + + - title: werf kubectl run + url: /reference/cli/werf_kubectl_run.html + + - title: werf kubectl scale + url: /reference/cli/werf_kubectl_scale.html + + - title: werf kubectl set + f: + + - title: werf kubectl set env + url: /reference/cli/werf_kubectl_set_env.html + + - title: werf kubectl set image + url: /reference/cli/werf_kubectl_set_image.html + + - title: werf kubectl set resources + url: /reference/cli/werf_kubectl_set_resources.html + + - title: werf kubectl set selector + url: /reference/cli/werf_kubectl_set_selector.html + + - title: werf kubectl set serviceaccount + url: /reference/cli/werf_kubectl_set_serviceaccount.html + + - title: werf kubectl set subject + url: /reference/cli/werf_kubectl_set_subject.html + + - title: werf kubectl taint + url: /reference/cli/werf_kubectl_taint.html + + - title: werf kubectl top + f: + + - title: werf kubectl top node + url: /reference/cli/werf_kubectl_top_node.html + + - title: werf kubectl top pod + url: /reference/cli/werf_kubectl_top_pod.html + + - title: werf kubectl uncordon + url: /reference/cli/werf_kubectl_uncordon.html + + - title: werf kubectl version + url: /reference/cli/werf_kubectl_version.html + + - title: werf kubectl wait + url: /reference/cli/werf_kubectl_wait.html + - title: Other commands f: diff --git a/docs/_includes/reference/cli/werf_kube_run.md b/docs/_includes/reference/cli/werf_kube_run.md new file mode 100644 index 0000000000..e35177b08c --- /dev/null +++ b/docs/_includes/reference/cli/werf_kube_run.md @@ -0,0 +1,209 @@ +{% if include.header %} +{% assign header = include.header %} +{% else %} +{% assign header = "###" %} +{% endif %} +Run container in Kubernetes for specified project image from werf.yaml (build if needed) + +{{ header }} Syntax + +```shell +werf kube-run [options] [IMAGE_NAME] [-- COMMAND ARG...] +``` + +{{ header }} Examples + +```shell + # Run specified image + $ werf kube-run --repo test/test application + + # Run interactive shell in the image + $ werf kube-run --repo test/test -it -- sh + + # Run image with specified command + $ werf kube-run --repo test/test -- /app/run.sh +``` + +{{ header }} Options + +```shell + --cache-repo=[] + Specify one or multiple cache repos with images that will be used as a cache. Cache + will be populated when pushing newly built images into the primary repo and when + pulling existing images from the primary repo. Cache repo will be used to pull images + and to get manifests before making requests to the primary repo. + Also, can be specified with $WERF_CACHE_REPO_* (e.g. $WERF_CACHE_REPO_1=..., + $WERF_CACHE_REPO_2=...) + --config='' + Use custom configuration file (default $WERF_CONFIG or werf.yaml in working directory) + --config-templates-dir='' + Custom configuration templates directory (default $WERF_CONFIG_TEMPLATES_DIR or .werf + in working directory) + --dev=false + Enable development mode (default $WERF_DEV). + The mode allows working with project files without doing redundant commits during + debugging and development + --dev-branch='_werf-dev' + Set dev git branch name (default $WERF_DEV_BRANCH or "_werf-dev") + --dev-ignore=[] + Add rules to ignore tracked and untracked changes in development mode (can specify + multiple). + Also, can be specified with $WERF_DEV_IGNORE_* (e.g. $WERF_DEV_IGNORE_TESTS=*_test.go, + $WERF_DEV_IGNORE_DOCS=path/to/docs) + --dir='' + Use specified project directory where project’s werf.yaml and other configuration files + should reside (default $WERF_DIR or current working directory) + --docker-config='' + Specify docker config directory path. Default $WERF_DOCKER_CONFIG or $DOCKER_CONFIG or + ~/.docker (in the order of priority) + Command needs granted permissions to read and pull images from the specified repo + --dry-run=false + Indicate what the command would do without actually doing that (default $WERF_DRY_RUN) + --env='' + Use specified environment (default $WERF_ENV) + --extra-options='' + Pass extra options to "kubectl run" command (default $WERF_EXTRA_OPTIONS) + --final-repo='' + Docker Repo to store only those stages which are going to be used by the Kubernetes + cluster, in other word final images (default $WERF_FINAL_REPO) + --final-repo-container-registry='' + Choose repo container registry for . + The following container registries are supported: ecr, acr, default, dockerhub, gcr, + github, gitlab, harbor, quay. + Default $WERF_FINAL_REPO_CONTAINER_REGISTRY or auto mode (detect container registry by + repo address). + --final-repo-docker-hub-password='' + Docker Hub password for (default $WERF_FINAL_REPO_DOCKER_HUB_PASSWORD) + --final-repo-docker-hub-token='' + Docker Hub token for (default $WERF_FINAL_REPO_DOCKER_HUB_TOKEN) + --final-repo-docker-hub-username='' + Docker Hub username for (default $WERF_FINAL_REPO_DOCKER_HUB_USERNAME) + --final-repo-github-token='' + GitHub token for (default $WERF_FINAL_REPO_GITHUB_TOKEN) + --final-repo-harbor-password='' + Harbor password for (default $WERF_FINAL_REPO_HARBOR_PASSWORD) + --final-repo-harbor-username='' + Harbor username for (default $WERF_FINAL_REPO_HARBOR_USERNAME) + --final-repo-quay-token='' + quay.io token for (default $WERF_FINAL_REPO_QUAY_TOKEN) + --follow=false + Enable follow mode (default $WERF_FOLLOW). + The mode allows restarting the command on a new commit. + In development mode (--dev), werf restarts the command on any changes (including + untracked files) in the git repository worktree + --git-work-tree='' + Use specified git work tree dir (default $WERF_WORK_TREE or lookup for directory that + contains .git in the current or parent directories) + --home-dir='' + Use specified dir to store werf cache files and dirs (default $WERF_HOME or ~/.werf) + --insecure-registry=false + Use plain HTTP requests when accessing a registry (default $WERF_INSECURE_REGISTRY) + -i, --interactive=false + Enable interactive mode (default $WERF_INTERACTIVE or false if not specified) + --kube-config='' + Kubernetes config file path (default $WERF_KUBE_CONFIG, or $WERF_KUBECONFIG, or + $KUBECONFIG) + --kube-config-base64='' + Kubernetes config data as base64 string (default $WERF_KUBE_CONFIG_BASE64 or + $WERF_KUBECONFIG_BASE64 or $KUBECONFIG_BASE64) + --kube-context='' + Kubernetes config context (default $WERF_KUBE_CONTEXT) + --log-color-mode='auto' + Set log color mode. + Supported on, off and auto (based on the stdout’s file descriptor referring to a + terminal) modes. + Default $WERF_LOG_COLOR_MODE or auto mode. + --log-debug=false + Enable debug (default $WERF_LOG_DEBUG). + --log-pretty=true + Enable emojis, auto line wrapping and log process border (default $WERF_LOG_PRETTY or + true). + --log-project-dir=false + Print current project directory path (default $WERF_LOG_PROJECT_DIR) + --log-quiet=false + Disable explanatory output (default $WERF_LOG_QUIET). + --log-terminal-width=-1 + Set log terminal width. + Defaults to: + * $WERF_LOG_TERMINAL_WIDTH + * interactive terminal width or 140 + --log-verbose=false + Enable verbose output (default $WERF_LOG_VERBOSE). + --loose-giterminism=false + Loose werf giterminism mode restrictions (NOTE: not all restrictions can be removed, + more info https://werf.io/documentation/advanced/giterminism.html, default + $WERF_LOOSE_GITERMINISM) + --namespace='' + Use specified Kubernetes namespace (default [[ project ]]-[[ env ]] template or + deploy.namespace custom template from werf.yaml or $WERF_NAMESPACE) + --overrides='' + Inline JSON to override/extend any fields in created Pod, e.g. to add imagePullSecrets + field (default $WERF_OVERRIDES) + --platform='' + Enable platform emulation when building images with werf. The only supported option for + now is linux/amd64. + --pod='' + Set created pod name (default $WERF_POD or autogenerated if not specified) + --repo='' + Docker Repo to store stages (default $WERF_REPO) + --repo-container-registry='' + Choose repo container registry. + The following container registries are supported: ecr, acr, default, dockerhub, gcr, + github, gitlab, harbor, quay. + Default $WERF_REPO_CONTAINER_REGISTRY or auto mode (detect container registry by repo + address). + --repo-docker-hub-password='' + Docker Hub password (default $WERF_REPO_DOCKER_HUB_PASSWORD) + --repo-docker-hub-token='' + Docker Hub token (default $WERF_REPO_DOCKER_HUB_TOKEN) + --repo-docker-hub-username='' + Docker Hub username (default $WERF_REPO_DOCKER_HUB_USERNAME) + --repo-github-token='' + GitHub token (default $WERF_REPO_GITHUB_TOKEN) + --repo-harbor-password='' + Harbor password (default $WERF_REPO_HARBOR_PASSWORD) + --repo-harbor-username='' + Harbor username (default $WERF_REPO_HARBOR_USERNAME) + --repo-quay-token='' + quay.io token (default $WERF_REPO_QUAY_TOKEN) + --rm=true + Remove pod after command completion (default $WERF_RM or true if not specified) + --rm-with-namespace=false + Remove also a namespace after command completion (default $WERF_RM_WITH_NAMESPACE or + false if not specified) + --secondary-repo=[] + Specify one or multiple secondary read-only repos with images that will be used as a + cache. + Also, can be specified with $WERF_SECONDARY_REPO_* (e.g. $WERF_SECONDARY_REPO_1=..., + $WERF_SECONDARY_REPO_2=...) + -Z, --skip-build=false + Disable building of docker images, cached images in the repo should exist in the repo + if werf.yaml contains at least one image description (default $WERF_SKIP_BUILD) + --skip-tls-verify-registry=false + Skip TLS certificate validation when accessing a registry (default + $WERF_SKIP_TLS_VERIFY_REGISTRY) + --ssh-key=[] + Use only specific ssh key(s). + Can be specified with $WERF_SSH_KEY_* (e.g. $WERF_SSH_KEY_REPO=~/.ssh/repo_rsa, + $WERF_SSH_KEY_NODEJS=~/.ssh/nodejs_rsa). + Defaults to $WERF_SSH_KEY_*, system ssh-agent or ~/.ssh/{id_rsa|id_dsa}, see + https://werf.io/documentation/reference/toolbox/ssh.html + -S, --synchronization='' + Address of synchronizer for multiple werf processes to work with a single repo. + + Default: + - $WERF_SYNCHRONIZATION, or + - :local if --repo is not specified, or + - https://synchronization.werf.io if --repo has been specified. + + The same address should be specified for all werf processes that work with a single + repo. :local address allows execution of werf processes from a single host only + --tmp-dir='' + Use specified dir to store tmp files and dirs (default $WERF_TMP_DIR or system tmp dir) + -t, --tty=false + Allocate a TTY (default $WERF_TTY or false if not specified) + --virtual-merge=false + Enable virtual/ephemeral merge commit mode when building current application state + ($WERF_VIRTUAL_MERGE by default) +``` + diff --git a/docs/_includes/reference/cli/werf_kube_run.short.md b/docs/_includes/reference/cli/werf_kube_run.short.md new file mode 100644 index 0000000000..3d30809f40 --- /dev/null +++ b/docs/_includes/reference/cli/werf_kube_run.short.md @@ -0,0 +1 @@ +run container for project image in Kubernetes \ No newline at end of file diff --git a/docs/_includes/reference/cli/werf_kubectl.md b/docs/_includes/reference/cli/werf_kubectl.md new file mode 100644 index 0000000000..fd93cb8489 --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl.md @@ -0,0 +1,72 @@ +{% if include.header %} +{% assign header = include.header %} +{% else %} +{% assign header = "###" %} +{% endif %} +kubectl controls the Kubernetes cluster manager. + + Find more information at: [https://kubernetes.io/docs/reference/kubectl/overview/](https://kubernetes.io/docs/reference/kubectl/overview/) + +{{ header }} Syntax + +```shell +werf kubectl [flags] [options] +``` + +{{ header }} Options + +```shell + --as='' + Username to impersonate for the operation. User could be a regular user or a service + account in a namespace. + --as-group=[] + Group to impersonate for the operation, this flag can be repeated to specify multiple + groups. + --as-uid='' + UID to impersonate for the operation. + --cache-dir='~/.kube/cache' + Default cache directory + --certificate-authority='' + Path to a cert file for the certificate authority + --client-certificate='' + Path to a client certificate file for TLS + --client-key='' + Path to a client key file for TLS + --cluster='' + The name of the kubeconfig cluster to use + --context='' + The name of the kubeconfig context to use + --insecure-skip-tls-verify=false + If true, the server`s certificate will not be checked for validity. This will make your + HTTPS connections insecure + --kubeconfig='' + Path to the kubeconfig file to use for CLI requests. + --match-server-version=false + Require server version to match client version + -n, --namespace='' + If present, the namespace scope for this CLI request + --password='' + Password for basic authentication to the API server + --profile='none' + Name of profile to capture. One of (none|cpu|heap|goroutine|threadcreate|block|mutex) + --profile-output='profile.pprof' + Name of the file to write the profile to + --request-timeout='0' + The length of time to wait before giving up on a single server request. Non-zero values + should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don`t + timeout requests. + -s, --server='' + The address and port of the Kubernetes API server + --tls-server-name='' + Server name to use for server certificate validation. If it is not provided, the + hostname used to contact the server is used + --token='' + Bearer token for authentication to the API server + --user='' + The name of the kubeconfig user to use + --username='' + Username for basic authentication to the API server + --warnings-as-errors=false + Treat warnings received from the server as errors and exit with a non-zero exit code +``` + diff --git a/docs/_includes/reference/cli/werf_kubectl.short.md b/docs/_includes/reference/cli/werf_kubectl.short.md new file mode 100644 index 0000000000..eb64534ea5 --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl.short.md @@ -0,0 +1 @@ +kubectl controls the Kubernetes cluster manager \ No newline at end of file diff --git a/docs/_includes/reference/cli/werf_kubectl_alpha.md b/docs/_includes/reference/cli/werf_kubectl_alpha.md new file mode 100644 index 0000000000..6c6743bba7 --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_alpha.md @@ -0,0 +1,64 @@ +{% if include.header %} +{% assign header = include.header %} +{% else %} +{% assign header = "###" %} +{% endif %} +These commands correspond to alpha features that are not enabled in Kubernetes clusters by default. + +{{ header }} Options inherited from parent commands + +```shell + --as='' + Username to impersonate for the operation. User could be a regular user or a service + account in a namespace. + --as-group=[] + Group to impersonate for the operation, this flag can be repeated to specify multiple + groups. + --as-uid='' + UID to impersonate for the operation. + --cache-dir='~/.kube/cache' + Default cache directory + --certificate-authority='' + Path to a cert file for the certificate authority + --client-certificate='' + Path to a client certificate file for TLS + --client-key='' + Path to a client key file for TLS + --cluster='' + The name of the kubeconfig cluster to use + --context='' + The name of the kubeconfig context to use + --insecure-skip-tls-verify=false + If true, the server`s certificate will not be checked for validity. This will make your + HTTPS connections insecure + --kubeconfig='' + Path to the kubeconfig file to use for CLI requests. + --match-server-version=false + Require server version to match client version + -n, --namespace='' + If present, the namespace scope for this CLI request + --password='' + Password for basic authentication to the API server + --profile='none' + Name of profile to capture. One of (none|cpu|heap|goroutine|threadcreate|block|mutex) + --profile-output='profile.pprof' + Name of the file to write the profile to + --request-timeout='0' + The length of time to wait before giving up on a single server request. Non-zero values + should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don`t + timeout requests. + -s, --server='' + The address and port of the Kubernetes API server + --tls-server-name='' + Server name to use for server certificate validation. If it is not provided, the + hostname used to contact the server is used + --token='' + Bearer token for authentication to the API server + --user='' + The name of the kubeconfig user to use + --username='' + Username for basic authentication to the API server + --warnings-as-errors=false + Treat warnings received from the server as errors and exit with a non-zero exit code +``` + diff --git a/docs/_includes/reference/cli/werf_kubectl_alpha.short.md b/docs/_includes/reference/cli/werf_kubectl_alpha.short.md new file mode 100644 index 0000000000..c8bff7a49d --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_alpha.short.md @@ -0,0 +1 @@ +commands for features in alpha \ No newline at end of file diff --git a/docs/_includes/reference/cli/werf_kubectl_alpha_events.md b/docs/_includes/reference/cli/werf_kubectl_alpha_events.md new file mode 100644 index 0000000000..ba98b6b9de --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_alpha_events.md @@ -0,0 +1,100 @@ +{% if include.header %} +{% assign header = include.header %} +{% else %} +{% assign header = "###" %} +{% endif %} +Experimental: Display events + + Prints a table of the most important information about events. You can request events for a namespace, for all namespace, or filtered to only those pertaining to a specified resource. + +{{ header }} Syntax + +```shell +werf kubectl alpha events [--for TYPE/NAME] [--watch] [options] +``` + +{{ header }} Examples + +```shell + # List recent events in the default namespace. + kubectl alpha events + + # List recent events in all namespaces. + kubectl alpha events --all-namespaces + + # List recent events for the specified pod, then wait for more events and list them as they arrive. + kubectl alpha events --for pod/web-pod-13je7 --watch +``` + +{{ header }} Options + +```shell + -A, --all-namespaces=false + If present, list the requested object(s) across all namespaces. Namespace in current + context is ignored even if specified with --namespace. + --chunk-size=500 + Return large lists in chunks rather than all at once. Pass 0 to disable. This flag is + beta and may change in the future. + --for='' + Filter events to only those pertaining to the specified resource. + -w, --watch=false + After listing the requested events, watch for more events. +``` + +{{ header }} Options inherited from parent commands + +```shell + --as='' + Username to impersonate for the operation. User could be a regular user or a service + account in a namespace. + --as-group=[] + Group to impersonate for the operation, this flag can be repeated to specify multiple + groups. + --as-uid='' + UID to impersonate for the operation. + --cache-dir='~/.kube/cache' + Default cache directory + --certificate-authority='' + Path to a cert file for the certificate authority + --client-certificate='' + Path to a client certificate file for TLS + --client-key='' + Path to a client key file for TLS + --cluster='' + The name of the kubeconfig cluster to use + --context='' + The name of the kubeconfig context to use + --insecure-skip-tls-verify=false + If true, the server`s certificate will not be checked for validity. This will make your + HTTPS connections insecure + --kubeconfig='' + Path to the kubeconfig file to use for CLI requests. + --match-server-version=false + Require server version to match client version + -n, --namespace='' + If present, the namespace scope for this CLI request + --password='' + Password for basic authentication to the API server + --profile='none' + Name of profile to capture. One of (none|cpu|heap|goroutine|threadcreate|block|mutex) + --profile-output='profile.pprof' + Name of the file to write the profile to + --request-timeout='0' + The length of time to wait before giving up on a single server request. Non-zero values + should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don`t + timeout requests. + -s, --server='' + The address and port of the Kubernetes API server + --tls-server-name='' + Server name to use for server certificate validation. If it is not provided, the + hostname used to contact the server is used + --token='' + Bearer token for authentication to the API server + --user='' + The name of the kubeconfig user to use + --username='' + Username for basic authentication to the API server + --warnings-as-errors=false + Treat warnings received from the server as errors and exit with a non-zero exit code +``` + diff --git a/docs/_includes/reference/cli/werf_kubectl_alpha_events.short.md b/docs/_includes/reference/cli/werf_kubectl_alpha_events.short.md new file mode 100644 index 0000000000..6ce07f1329 --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_alpha_events.short.md @@ -0,0 +1 @@ +experimental: List events \ No newline at end of file diff --git a/docs/_includes/reference/cli/werf_kubectl_annotate.md b/docs/_includes/reference/cli/werf_kubectl_annotate.md new file mode 100644 index 0000000000..8992cc0f28 --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_annotate.md @@ -0,0 +1,151 @@ +{% if include.header %} +{% assign header = include.header %} +{% else %} +{% assign header = "###" %} +{% endif %} +Update the annotations on one or more resources. + + All Kubernetes objects support the ability to store additional data with the object as annotations. Annotations are key/value pairs that can be larger than labels and include arbitrary string values such as structured JSON. Tools and system extensions may use annotations to store their own data. + + Attempting to set an annotation that already exists will fail unless --overwrite is set. If --resource-version is specified and does not match the current resource version on the server the command will fail. + +Use "kubectl api-resources" for a complete list of supported resources. + +{{ header }} Syntax + +```shell +werf kubectl annotate [--overwrite] (-f FILENAME | TYPE NAME) KEY_1=VAL_1 ... KEY_N=VAL_N [--resource-version=version] [options] +``` + +{{ header }} Examples + +```shell + # Update pod 'foo' with the annotation 'description' and the value 'my frontend' + # If the same annotation is set multiple times, only the last value will be applied + kubectl annotate pods foo description='my frontend' + + # Update a pod identified by type and name in "pod.json" + kubectl annotate -f pod.json description='my frontend' + + # Update pod 'foo' with the annotation 'description' and the value 'my frontend running nginx', overwriting any existing value + kubectl annotate --overwrite pods foo description='my frontend running nginx' + + # Update all pods in the namespace + kubectl annotate pods --all description='my frontend running nginx' + + # Update pod 'foo' only if the resource is unchanged from version 1 + kubectl annotate pods foo description='my frontend running nginx' --resource-version=1 + + # Update pod 'foo' by removing an annotation named 'description' if it exists + # Does not require the --overwrite flag + kubectl annotate pods foo description- +``` + +{{ header }} Options + +```shell + --all=false + Select all resources, in the namespace of the specified resource types. + -A, --all-namespaces=false + If true, check the specified action in all namespaces. + --allow-missing-template-keys=true + If true, ignore any errors in templates when a field or map key is missing in the + template. Only applies to golang and jsonpath output formats. + --dry-run='none' + Must be "none", "server", or "client". If client strategy, only print the object that + would be sent, without sending it. If server strategy, submit server-side request + without persisting the resource. + --field-manager='kubectl-annotate' + Name of the manager used to track field ownership. + --field-selector='' + Selector (field query) to filter on, supports `=`, `==`, and `!=`.(e.g. + --field-selector key1=value1,key2=value2). The server only supports a limited number of + field queries per type. + -f, --filename=[] + Filename, directory, or URL to files identifying the resource to update the annotation + -k, --kustomize='' + Process the kustomization directory. This flag can`t be used together with -f or -R. + --list=false + If true, display the annotations for a given resource. + --local=false + If true, annotation will NOT contact api-server but run locally. + -o, --output='' + Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile + |jsonpath|jsonpath-as-json|jsonpath-file. + --overwrite=false + If true, allow annotations to be overwritten, otherwise reject annotation updates that + overwrite existing annotations. + -R, --recursive=false + Process the directory used in -f, --filename recursively. Useful when you want to + manage related manifests organized within the same directory. + --resource-version='' + If non-empty, the annotation update will only succeed if this is the current + resource-version for the object. Only valid when specifying a single resource. + -l, --selector='' + Selector (label query) to filter on, supports `=`, `==`, and `!=`.(e.g. -l + key1=value1,key2=value2). + --show-managed-fields=false + If true, keep the managedFields when printing objects in JSON or YAML format. + --template='' + Template string or path to template file to use when -o=go-template, + -o=go-template-file. The template format is golang templates + [http://golang.org/pkg/text/template/#pkg-overview]. +``` + +{{ header }} Options inherited from parent commands + +```shell + --as='' + Username to impersonate for the operation. User could be a regular user or a service + account in a namespace. + --as-group=[] + Group to impersonate for the operation, this flag can be repeated to specify multiple + groups. + --as-uid='' + UID to impersonate for the operation. + --cache-dir='~/.kube/cache' + Default cache directory + --certificate-authority='' + Path to a cert file for the certificate authority + --client-certificate='' + Path to a client certificate file for TLS + --client-key='' + Path to a client key file for TLS + --cluster='' + The name of the kubeconfig cluster to use + --context='' + The name of the kubeconfig context to use + --insecure-skip-tls-verify=false + If true, the server`s certificate will not be checked for validity. This will make your + HTTPS connections insecure + --kubeconfig='' + Path to the kubeconfig file to use for CLI requests. + --match-server-version=false + Require server version to match client version + -n, --namespace='' + If present, the namespace scope for this CLI request + --password='' + Password for basic authentication to the API server + --profile='none' + Name of profile to capture. One of (none|cpu|heap|goroutine|threadcreate|block|mutex) + --profile-output='profile.pprof' + Name of the file to write the profile to + --request-timeout='0' + The length of time to wait before giving up on a single server request. Non-zero values + should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don`t + timeout requests. + -s, --server='' + The address and port of the Kubernetes API server + --tls-server-name='' + Server name to use for server certificate validation. If it is not provided, the + hostname used to contact the server is used + --token='' + Bearer token for authentication to the API server + --user='' + The name of the kubeconfig user to use + --username='' + Username for basic authentication to the API server + --warnings-as-errors=false + Treat warnings received from the server as errors and exit with a non-zero exit code +``` + diff --git a/docs/_includes/reference/cli/werf_kubectl_annotate.short.md b/docs/_includes/reference/cli/werf_kubectl_annotate.short.md new file mode 100644 index 0000000000..12e91da719 --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_annotate.short.md @@ -0,0 +1 @@ +update the annotations on a resource \ No newline at end of file diff --git a/docs/_includes/reference/cli/werf_kubectl_api_resources.md b/docs/_includes/reference/cli/werf_kubectl_api_resources.md new file mode 100644 index 0000000000..abee76f8c3 --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_api_resources.md @@ -0,0 +1,114 @@ +{% if include.header %} +{% assign header = include.header %} +{% else %} +{% assign header = "###" %} +{% endif %} +Print the supported API resources on the server. + +{{ header }} Syntax + +```shell +werf kubectl api-resources [flags] [options] +``` + +{{ header }} Examples + +```shell + # Print the supported API resources + kubectl api-resources + + # Print the supported API resources with more information + kubectl api-resources -o wide + + # Print the supported API resources sorted by a column + kubectl api-resources --sort-by=name + + # Print the supported namespaced resources + kubectl api-resources --namespaced=true + + # Print the supported non-namespaced resources + kubectl api-resources --namespaced=false + + # Print the supported API resources with a specific APIGroup + kubectl api-resources --api-group=extensions +``` + +{{ header }} Options + +```shell + --api-group='' + Limit to resources in the specified API group. + --cached=false + Use the cached list of resources if available. + --namespaced=true + If false, non-namespaced resources will be returned, otherwise returning namespaced + resources by default. + --no-headers=false + When using the default or custom-column output format, don`t print headers (default + print headers). + -o, --output='' + Output format. One of: wide|name. + --sort-by='' + If non-empty, sort list of resources using specified field. The field can be either + `name` or `kind`. + --verbs=[] + Limit to resources that support the specified verbs. +``` + +{{ header }} Options inherited from parent commands + +```shell + --as='' + Username to impersonate for the operation. User could be a regular user or a service + account in a namespace. + --as-group=[] + Group to impersonate for the operation, this flag can be repeated to specify multiple + groups. + --as-uid='' + UID to impersonate for the operation. + --cache-dir='~/.kube/cache' + Default cache directory + --certificate-authority='' + Path to a cert file for the certificate authority + --client-certificate='' + Path to a client certificate file for TLS + --client-key='' + Path to a client key file for TLS + --cluster='' + The name of the kubeconfig cluster to use + --context='' + The name of the kubeconfig context to use + --insecure-skip-tls-verify=false + If true, the server`s certificate will not be checked for validity. This will make your + HTTPS connections insecure + --kubeconfig='' + Path to the kubeconfig file to use for CLI requests. + --match-server-version=false + Require server version to match client version + -n, --namespace='' + If present, the namespace scope for this CLI request + --password='' + Password for basic authentication to the API server + --profile='none' + Name of profile to capture. One of (none|cpu|heap|goroutine|threadcreate|block|mutex) + --profile-output='profile.pprof' + Name of the file to write the profile to + --request-timeout='0' + The length of time to wait before giving up on a single server request. Non-zero values + should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don`t + timeout requests. + -s, --server='' + The address and port of the Kubernetes API server + --tls-server-name='' + Server name to use for server certificate validation. If it is not provided, the + hostname used to contact the server is used + --token='' + Bearer token for authentication to the API server + --user='' + The name of the kubeconfig user to use + --username='' + Username for basic authentication to the API server + --warnings-as-errors=false + Treat warnings received from the server as errors and exit with a non-zero exit code +``` + diff --git a/docs/_includes/reference/cli/werf_kubectl_api_resources.short.md b/docs/_includes/reference/cli/werf_kubectl_api_resources.short.md new file mode 100644 index 0000000000..f322467e73 --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_api_resources.short.md @@ -0,0 +1 @@ +print the supported API resources on the server \ No newline at end of file diff --git a/docs/_includes/reference/cli/werf_kubectl_api_versions.md b/docs/_includes/reference/cli/werf_kubectl_api_versions.md new file mode 100644 index 0000000000..84e4ed67e9 --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_api_versions.md @@ -0,0 +1,77 @@ +{% if include.header %} +{% assign header = include.header %} +{% else %} +{% assign header = "###" %} +{% endif %} +Print the supported API versions on the server, in the form of "group/version". + +{{ header }} Syntax + +```shell +werf kubectl api-versions +``` + +{{ header }} Examples + +```shell + # Print the supported API versions + kubectl api-versions +``` + +{{ header }} Options inherited from parent commands + +```shell + --as='' + Username to impersonate for the operation. User could be a regular user or a service + account in a namespace. + --as-group=[] + Group to impersonate for the operation, this flag can be repeated to specify multiple + groups. + --as-uid='' + UID to impersonate for the operation. + --cache-dir='~/.kube/cache' + Default cache directory + --certificate-authority='' + Path to a cert file for the certificate authority + --client-certificate='' + Path to a client certificate file for TLS + --client-key='' + Path to a client key file for TLS + --cluster='' + The name of the kubeconfig cluster to use + --context='' + The name of the kubeconfig context to use + --insecure-skip-tls-verify=false + If true, the server`s certificate will not be checked for validity. This will make your + HTTPS connections insecure + --kubeconfig='' + Path to the kubeconfig file to use for CLI requests. + --match-server-version=false + Require server version to match client version + -n, --namespace='' + If present, the namespace scope for this CLI request + --password='' + Password for basic authentication to the API server + --profile='none' + Name of profile to capture. One of (none|cpu|heap|goroutine|threadcreate|block|mutex) + --profile-output='profile.pprof' + Name of the file to write the profile to + --request-timeout='0' + The length of time to wait before giving up on a single server request. Non-zero values + should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don`t + timeout requests. + -s, --server='' + The address and port of the Kubernetes API server + --tls-server-name='' + Server name to use for server certificate validation. If it is not provided, the + hostname used to contact the server is used + --token='' + Bearer token for authentication to the API server + --user='' + The name of the kubeconfig user to use + --username='' + Username for basic authentication to the API server + --warnings-as-errors=false + Treat warnings received from the server as errors and exit with a non-zero exit code +``` + diff --git a/docs/_includes/reference/cli/werf_kubectl_api_versions.short.md b/docs/_includes/reference/cli/werf_kubectl_api_versions.short.md new file mode 100644 index 0000000000..3b64684bf9 --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_api_versions.short.md @@ -0,0 +1 @@ +print the supported API versions on the server, in the form of "group/version" \ No newline at end of file diff --git a/docs/_includes/reference/cli/werf_kubectl_apply.md b/docs/_includes/reference/cli/werf_kubectl_apply.md new file mode 100644 index 0000000000..99fa2b4245 --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_apply.md @@ -0,0 +1,163 @@ +{% if include.header %} +{% assign header = include.header %} +{% else %} +{% assign header = "###" %} +{% endif %} +Apply a configuration to a resource by file name or stdin. The resource name must be specified. This resource will be created if it doesn't exist yet. To use 'apply', always create the resource initially with either 'apply' or 'create --save-config'. + + JSON and YAML formats are accepted. + + Alpha Disclaimer: the --prune functionality is not yet complete. Do not use unless you are aware of what the current state is. See [https://issues.k8s.io/34274](https://issues.k8s.io/34274). + +{{ header }} Syntax + +```shell +werf kubectl apply (-f FILENAME | -k DIRECTORY) [options] +``` + +{{ header }} Examples + +```shell + # Apply the configuration in pod.json to a pod + kubectl apply -f ./pod.json + + # Apply resources from a directory containing kustomization.yaml - e.g. dir/kustomization.yaml + kubectl apply -k dir/ + + # Apply the JSON passed into stdin to a pod + cat pod.json | kubectl apply -f - + + # Note: --prune is still in Alpha + # Apply the configuration in manifest.yaml that matches label app=nginx and delete all other resources that are not in the file and match label app=nginx + kubectl apply --prune -f manifest.yaml -l app=nginx + + # Apply the configuration in manifest.yaml and delete all the other config maps that are not in the file + kubectl apply --prune -f manifest.yaml --all --prune-whitelist=core/v1/ConfigMap +``` + +{{ header }} Options + +```shell + --all=false + Select all resources in the namespace of the specified resource types. + --allow-missing-template-keys=true + If true, ignore any errors in templates when a field or map key is missing in the + template. Only applies to golang and jsonpath output formats. + --cascade='background' + Must be "background", "orphan", or "foreground". Selects the deletion cascading + strategy for the dependents (e.g. Pods created by a ReplicationController). Defaults to + background. + --dry-run='none' + Must be "none", "server", or "client". If client strategy, only print the object that + would be sent, without sending it. If server strategy, submit server-side request + without persisting the resource. + --field-manager='kubectl-client-side-apply' + Name of the manager used to track field ownership. + -f, --filename=[] + that contains the configuration to apply + --force=false + If true, immediately remove resources from API and bypass graceful deletion. Note that + immediate deletion of some resources may result in inconsistency or data loss and + requires confirmation. + --force-conflicts=false + If true, server-side apply will force the changes against conflicts. + --grace-period=-1 + Period of time in seconds given to the resource to terminate gracefully. Ignored if + negative. Set to 1 for immediate shutdown. Can only be set to 0 when --force is true + (force deletion). + -k, --kustomize='' + Process a kustomization directory. This flag can`t be used together with -f or -R. + --openapi-patch=true + If true, use openapi to calculate diff when the openapi presents and the resource can + be found in the openapi spec. Otherwise, fall back to use baked-in types. + -o, --output='' + Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile + |jsonpath|jsonpath-as-json|jsonpath-file. + --overwrite=true + Automatically resolve conflicts between the modified and live configuration by using + values from the modified configuration + --prune=false + Automatically delete resource objects, that do not appear in the configs and are + created by either apply or create --save-config. Should be used with either -l or --all. + --prune-whitelist=[] + Overwrite the default whitelist with for --prune + -R, --recursive=false + Process the directory used in -f, --filename recursively. Useful when you want to + manage related manifests organized within the same directory. + -l, --selector='' + Selector (label query) to filter on, supports `=`, `==`, and `!=`.(e.g. -l + key1=value1,key2=value2) + --server-side=false + If true, apply runs in the server instead of the client. + --show-managed-fields=false + If true, keep the managedFields when printing objects in JSON or YAML format. + --template='' + Template string or path to template file to use when -o=go-template, + -o=go-template-file. The template format is golang templates + [http://golang.org/pkg/text/template/#pkg-overview]. + --timeout=0s + The length of time to wait before giving up on a delete, zero means determine a timeout + from the size of the object + --validate=true + If true, use a schema to validate the input before sending it + --wait=false + If true, wait for resources to be gone before returning. This waits for finalizers. +``` + +{{ header }} Options inherited from parent commands + +```shell + --as='' + Username to impersonate for the operation. User could be a regular user or a service + account in a namespace. + --as-group=[] + Group to impersonate for the operation, this flag can be repeated to specify multiple + groups. + --as-uid='' + UID to impersonate for the operation. + --cache-dir='~/.kube/cache' + Default cache directory + --certificate-authority='' + Path to a cert file for the certificate authority + --client-certificate='' + Path to a client certificate file for TLS + --client-key='' + Path to a client key file for TLS + --cluster='' + The name of the kubeconfig cluster to use + --context='' + The name of the kubeconfig context to use + --insecure-skip-tls-verify=false + If true, the server`s certificate will not be checked for validity. This will make your + HTTPS connections insecure + --kubeconfig='' + Path to the kubeconfig file to use for CLI requests. + --match-server-version=false + Require server version to match client version + -n, --namespace='' + If present, the namespace scope for this CLI request + --password='' + Password for basic authentication to the API server + --profile='none' + Name of profile to capture. One of (none|cpu|heap|goroutine|threadcreate|block|mutex) + --profile-output='profile.pprof' + Name of the file to write the profile to + --request-timeout='0' + The length of time to wait before giving up on a single server request. Non-zero values + should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don`t + timeout requests. + -s, --server='' + The address and port of the Kubernetes API server + --tls-server-name='' + Server name to use for server certificate validation. If it is not provided, the + hostname used to contact the server is used + --token='' + Bearer token for authentication to the API server + --user='' + The name of the kubeconfig user to use + --username='' + Username for basic authentication to the API server + --warnings-as-errors=false + Treat warnings received from the server as errors and exit with a non-zero exit code +``` + diff --git a/docs/_includes/reference/cli/werf_kubectl_apply.short.md b/docs/_includes/reference/cli/werf_kubectl_apply.short.md new file mode 100644 index 0000000000..4a891410de --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_apply.short.md @@ -0,0 +1 @@ +apply a configuration to a resource by file name or stdin \ No newline at end of file diff --git a/docs/_includes/reference/cli/werf_kubectl_apply_edit_last_applied.md b/docs/_includes/reference/cli/werf_kubectl_apply_edit_last_applied.md new file mode 100644 index 0000000000..1cb50bcafc --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_apply_edit_last_applied.md @@ -0,0 +1,116 @@ +{% if include.header %} +{% assign header = include.header %} +{% else %} +{% assign header = "###" %} +{% endif %} +Edit the latest last-applied-configuration annotations of resources from the default editor. + + The edit-last-applied command allows you to directly edit any API resource you can retrieve via the command-line tools. It will open the editor defined by your KUBE_EDITOR, or EDITOR environment variables, or fall back to 'vi' for Linux or 'notepad' for Windows. You can edit multiple objects, although changes are applied one at a time. The command accepts file names as well as command-line arguments, although the files you point to must be previously saved versions of resources. + + The default format is YAML. To edit in JSON, specify "-o json". + + The flag --windows-line-endings can be used to force Windows line endings, otherwise the default for your operating system will be used. + + In the event an error occurs while updating, a temporary file will be created on disk that contains your unapplied changes. The most common error when updating a resource is another editor changing the resource on the server. When this occurs, you will have to apply your changes to the newer version of the resource, or update your temporary saved copy to include the latest resource version. + +{{ header }} Syntax + +```shell +werf kubectl apply edit-last-applied (RESOURCE/NAME | -f FILENAME) [options] +``` + +{{ header }} Examples + +```shell + # Edit the last-applied-configuration annotations by type/name in YAML + kubectl apply edit-last-applied deployment/nginx + + # Edit the last-applied-configuration annotations by file in JSON + kubectl apply edit-last-applied -f deploy.yaml -o json +``` + +{{ header }} Options + +```shell + --allow-missing-template-keys=true + If true, ignore any errors in templates when a field or map key is missing in the + template. Only applies to golang and jsonpath output formats. + --field-manager='kubectl-client-side-apply' + Name of the manager used to track field ownership. + -f, --filename=[] + Filename, directory, or URL to files to use to edit the resource + -k, --kustomize='' + Process the kustomization directory. This flag can`t be used together with -f or -R. + -o, --output='' + Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile + |jsonpath|jsonpath-as-json|jsonpath-file. + -R, --recursive=false + Process the directory used in -f, --filename recursively. Useful when you want to + manage related manifests organized within the same directory. + --show-managed-fields=false + If true, keep the managedFields when printing objects in JSON or YAML format. + --template='' + Template string or path to template file to use when -o=go-template, + -o=go-template-file. The template format is golang templates + [http://golang.org/pkg/text/template/#pkg-overview]. + --windows-line-endings=false + Defaults to the line ending native to your platform. +``` + +{{ header }} Options inherited from parent commands + +```shell + --as='' + Username to impersonate for the operation. User could be a regular user or a service + account in a namespace. + --as-group=[] + Group to impersonate for the operation, this flag can be repeated to specify multiple + groups. + --as-uid='' + UID to impersonate for the operation. + --cache-dir='~/.kube/cache' + Default cache directory + --certificate-authority='' + Path to a cert file for the certificate authority + --client-certificate='' + Path to a client certificate file for TLS + --client-key='' + Path to a client key file for TLS + --cluster='' + The name of the kubeconfig cluster to use + --context='' + The name of the kubeconfig context to use + --insecure-skip-tls-verify=false + If true, the server`s certificate will not be checked for validity. This will make your + HTTPS connections insecure + --kubeconfig='' + Path to the kubeconfig file to use for CLI requests. + --match-server-version=false + Require server version to match client version + -n, --namespace='' + If present, the namespace scope for this CLI request + --password='' + Password for basic authentication to the API server + --profile='none' + Name of profile to capture. One of (none|cpu|heap|goroutine|threadcreate|block|mutex) + --profile-output='profile.pprof' + Name of the file to write the profile to + --request-timeout='0' + The length of time to wait before giving up on a single server request. Non-zero values + should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don`t + timeout requests. + -s, --server='' + The address and port of the Kubernetes API server + --tls-server-name='' + Server name to use for server certificate validation. If it is not provided, the + hostname used to contact the server is used + --token='' + Bearer token for authentication to the API server + --user='' + The name of the kubeconfig user to use + --username='' + Username for basic authentication to the API server + --warnings-as-errors=false + Treat warnings received from the server as errors and exit with a non-zero exit code +``` + diff --git a/docs/_includes/reference/cli/werf_kubectl_apply_edit_last_applied.short.md b/docs/_includes/reference/cli/werf_kubectl_apply_edit_last_applied.short.md new file mode 100644 index 0000000000..75f7420c7e --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_apply_edit_last_applied.short.md @@ -0,0 +1 @@ +edit latest last-applied-configuration annotations of a resource/object \ No newline at end of file diff --git a/docs/_includes/reference/cli/werf_kubectl_apply_set_last_applied.md b/docs/_includes/reference/cli/werf_kubectl_apply_set_last_applied.md new file mode 100644 index 0000000000..5a3f64715b --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_apply_set_last_applied.md @@ -0,0 +1,109 @@ +{% if include.header %} +{% assign header = include.header %} +{% else %} +{% assign header = "###" %} +{% endif %} +Set the latest last-applied-configuration annotations by setting it to match the contents of a file. This results in the last-applied-configuration being updated as though 'kubectl apply -f<file> ' was run, without updating any other parts of the object. + +{{ header }} Syntax + +```shell +werf kubectl apply set-last-applied -f FILENAME [options] +``` + +{{ header }} Examples + +```shell + # Set the last-applied-configuration of a resource to match the contents of a file + kubectl apply set-last-applied -f deploy.yaml + + # Execute set-last-applied against each configuration file in a directory + kubectl apply set-last-applied -f path/ + + # Set the last-applied-configuration of a resource to match the contents of a file; will create the annotation if it does not already exist + kubectl apply set-last-applied -f deploy.yaml --create-annotation=true +``` + +{{ header }} Options + +```shell + --allow-missing-template-keys=true + If true, ignore any errors in templates when a field or map key is missing in the + template. Only applies to golang and jsonpath output formats. + --create-annotation=false + Will create `last-applied-configuration` annotations if current objects doesn`t have one + --dry-run='none' + Must be "none", "server", or "client". If client strategy, only print the object that + would be sent, without sending it. If server strategy, submit server-side request + without persisting the resource. + -f, --filename=[] + Filename, directory, or URL to files that contains the last-applied-configuration + annotations + -o, --output='' + Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile + |jsonpath|jsonpath-as-json|jsonpath-file. + --show-managed-fields=false + If true, keep the managedFields when printing objects in JSON or YAML format. + --template='' + Template string or path to template file to use when -o=go-template, + -o=go-template-file. The template format is golang templates + [http://golang.org/pkg/text/template/#pkg-overview]. +``` + +{{ header }} Options inherited from parent commands + +```shell + --as='' + Username to impersonate for the operation. User could be a regular user or a service + account in a namespace. + --as-group=[] + Group to impersonate for the operation, this flag can be repeated to specify multiple + groups. + --as-uid='' + UID to impersonate for the operation. + --cache-dir='~/.kube/cache' + Default cache directory + --certificate-authority='' + Path to a cert file for the certificate authority + --client-certificate='' + Path to a client certificate file for TLS + --client-key='' + Path to a client key file for TLS + --cluster='' + The name of the kubeconfig cluster to use + --context='' + The name of the kubeconfig context to use + --insecure-skip-tls-verify=false + If true, the server`s certificate will not be checked for validity. This will make your + HTTPS connections insecure + --kubeconfig='' + Path to the kubeconfig file to use for CLI requests. + --match-server-version=false + Require server version to match client version + -n, --namespace='' + If present, the namespace scope for this CLI request + --password='' + Password for basic authentication to the API server + --profile='none' + Name of profile to capture. One of (none|cpu|heap|goroutine|threadcreate|block|mutex) + --profile-output='profile.pprof' + Name of the file to write the profile to + --request-timeout='0' + The length of time to wait before giving up on a single server request. Non-zero values + should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don`t + timeout requests. + -s, --server='' + The address and port of the Kubernetes API server + --tls-server-name='' + Server name to use for server certificate validation. If it is not provided, the + hostname used to contact the server is used + --token='' + Bearer token for authentication to the API server + --user='' + The name of the kubeconfig user to use + --username='' + Username for basic authentication to the API server + --warnings-as-errors=false + Treat warnings received from the server as errors and exit with a non-zero exit code +``` + diff --git a/docs/_includes/reference/cli/werf_kubectl_apply_set_last_applied.short.md b/docs/_includes/reference/cli/werf_kubectl_apply_set_last_applied.short.md new file mode 100644 index 0000000000..356899fbeb --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_apply_set_last_applied.short.md @@ -0,0 +1 @@ +set the last-applied-configuration annotation on a live object to match the contents of a file \ No newline at end of file diff --git a/docs/_includes/reference/cli/werf_kubectl_apply_view_last_applied.md b/docs/_includes/reference/cli/werf_kubectl_apply_view_last_applied.md new file mode 100644 index 0000000000..c83a0f2258 --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_apply_view_last_applied.md @@ -0,0 +1,102 @@ +{% if include.header %} +{% assign header = include.header %} +{% else %} +{% assign header = "###" %} +{% endif %} +View the latest last-applied-configuration annotations by type/name or file. + + The default output will be printed to stdout in YAML format. You can use the -o option to change the output format. + +{{ header }} Syntax + +```shell +werf kubectl apply view-last-applied (TYPE [NAME | -l label] | TYPE/NAME | -f FILENAME) [options] +``` + +{{ header }} Examples + +```shell + # View the last-applied-configuration annotations by type/name in YAML + kubectl apply view-last-applied deployment/nginx + + # View the last-applied-configuration annotations by file in JSON + kubectl apply view-last-applied -f deploy.yaml -o json +``` + +{{ header }} Options + +```shell + --all=false + Select all resources in the namespace of the specified resource types + -f, --filename=[] + Filename, directory, or URL to files that contains the last-applied-configuration + annotations + -k, --kustomize='' + Process the kustomization directory. This flag can`t be used together with -f or -R. + -o, --output='yaml' + Output format. Must be one of yaml|json + -R, --recursive=false + Process the directory used in -f, --filename recursively. Useful when you want to + manage related manifests organized within the same directory. + -l, --selector='' + Selector (label query) to filter on, supports `=`, `==`, and `!=`.(e.g. -l + key1=value1,key2=value2) +``` + +{{ header }} Options inherited from parent commands + +```shell + --as='' + Username to impersonate for the operation. User could be a regular user or a service + account in a namespace. + --as-group=[] + Group to impersonate for the operation, this flag can be repeated to specify multiple + groups. + --as-uid='' + UID to impersonate for the operation. + --cache-dir='~/.kube/cache' + Default cache directory + --certificate-authority='' + Path to a cert file for the certificate authority + --client-certificate='' + Path to a client certificate file for TLS + --client-key='' + Path to a client key file for TLS + --cluster='' + The name of the kubeconfig cluster to use + --context='' + The name of the kubeconfig context to use + --insecure-skip-tls-verify=false + If true, the server`s certificate will not be checked for validity. This will make your + HTTPS connections insecure + --kubeconfig='' + Path to the kubeconfig file to use for CLI requests. + --match-server-version=false + Require server version to match client version + -n, --namespace='' + If present, the namespace scope for this CLI request + --password='' + Password for basic authentication to the API server + --profile='none' + Name of profile to capture. One of (none|cpu|heap|goroutine|threadcreate|block|mutex) + --profile-output='profile.pprof' + Name of the file to write the profile to + --request-timeout='0' + The length of time to wait before giving up on a single server request. Non-zero values + should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don`t + timeout requests. + -s, --server='' + The address and port of the Kubernetes API server + --tls-server-name='' + Server name to use for server certificate validation. If it is not provided, the + hostname used to contact the server is used + --token='' + Bearer token for authentication to the API server + --user='' + The name of the kubeconfig user to use + --username='' + Username for basic authentication to the API server + --warnings-as-errors=false + Treat warnings received from the server as errors and exit with a non-zero exit code +``` + diff --git a/docs/_includes/reference/cli/werf_kubectl_apply_view_last_applied.short.md b/docs/_includes/reference/cli/werf_kubectl_apply_view_last_applied.short.md new file mode 100644 index 0000000000..04511126be --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_apply_view_last_applied.short.md @@ -0,0 +1 @@ +view the latest last-applied-configuration annotations of a resource/object \ No newline at end of file diff --git a/docs/_includes/reference/cli/werf_kubectl_attach.md b/docs/_includes/reference/cli/werf_kubectl_attach.md new file mode 100644 index 0000000000..41de5a3d9a --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_attach.md @@ -0,0 +1,106 @@ +{% if include.header %} +{% assign header = include.header %} +{% else %} +{% assign header = "###" %} +{% endif %} +Attach to a process that is already running inside an existing container. + +{{ header }} Syntax + +```shell +werf kubectl attach (POD | TYPE/NAME) -c CONTAINER [options] +``` + +{{ header }} Examples + +```shell + # Get output from running pod mypod; use the 'kubectl.kubernetes.io/default-container' annotation + # for selecting the container to be attached or the first container in the pod will be chosen + kubectl attach mypod + + # Get output from ruby-container from pod mypod + kubectl attach mypod -c ruby-container + + # Switch to raw terminal mode; sends stdin to 'bash' in ruby-container from pod mypod + # and sends stdout/stderr from 'bash' back to the client + kubectl attach mypod -c ruby-container -i -t + + # Get output from the first pod of a replica set named nginx + kubectl attach rs/nginx +``` + +{{ header }} Options + +```shell + -c, --container='' + Container name. If omitted, use the kubectl.kubernetes.io/default-container annotation + for selecting the container to be attached or the first container in the pod will be + chosen + --pod-running-timeout=1m0s + The length of time (like 5s, 2m, or 3h, higher than zero) to wait until at least one + pod is running + -q, --quiet=false + Only print output from the remote session + -i, --stdin=false + Pass stdin to the container + -t, --tty=false + Stdin is a TTY +``` + +{{ header }} Options inherited from parent commands + +```shell + --as='' + Username to impersonate for the operation. User could be a regular user or a service + account in a namespace. + --as-group=[] + Group to impersonate for the operation, this flag can be repeated to specify multiple + groups. + --as-uid='' + UID to impersonate for the operation. + --cache-dir='~/.kube/cache' + Default cache directory + --certificate-authority='' + Path to a cert file for the certificate authority + --client-certificate='' + Path to a client certificate file for TLS + --client-key='' + Path to a client key file for TLS + --cluster='' + The name of the kubeconfig cluster to use + --context='' + The name of the kubeconfig context to use + --insecure-skip-tls-verify=false + If true, the server`s certificate will not be checked for validity. This will make your + HTTPS connections insecure + --kubeconfig='' + Path to the kubeconfig file to use for CLI requests. + --match-server-version=false + Require server version to match client version + -n, --namespace='' + If present, the namespace scope for this CLI request + --password='' + Password for basic authentication to the API server + --profile='none' + Name of profile to capture. One of (none|cpu|heap|goroutine|threadcreate|block|mutex) + --profile-output='profile.pprof' + Name of the file to write the profile to + --request-timeout='0' + The length of time to wait before giving up on a single server request. Non-zero values + should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don`t + timeout requests. + -s, --server='' + The address and port of the Kubernetes API server + --tls-server-name='' + Server name to use for server certificate validation. If it is not provided, the + hostname used to contact the server is used + --token='' + Bearer token for authentication to the API server + --user='' + The name of the kubeconfig user to use + --username='' + Username for basic authentication to the API server + --warnings-as-errors=false + Treat warnings received from the server as errors and exit with a non-zero exit code +``` + diff --git a/docs/_includes/reference/cli/werf_kubectl_attach.short.md b/docs/_includes/reference/cli/werf_kubectl_attach.short.md new file mode 100644 index 0000000000..dfc3018e3a --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_attach.short.md @@ -0,0 +1 @@ +attach to a running container \ No newline at end of file diff --git a/docs/_includes/reference/cli/werf_kubectl_auth.md b/docs/_includes/reference/cli/werf_kubectl_auth.md new file mode 100644 index 0000000000..96167291a2 --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_auth.md @@ -0,0 +1,70 @@ +{% if include.header %} +{% assign header = include.header %} +{% else %} +{% assign header = "###" %} +{% endif %} +Inspect authorization + +{{ header }} Syntax + +```shell +werf kubectl auth +``` + +{{ header }} Options inherited from parent commands + +```shell + --as='' + Username to impersonate for the operation. User could be a regular user or a service + account in a namespace. + --as-group=[] + Group to impersonate for the operation, this flag can be repeated to specify multiple + groups. + --as-uid='' + UID to impersonate for the operation. + --cache-dir='~/.kube/cache' + Default cache directory + --certificate-authority='' + Path to a cert file for the certificate authority + --client-certificate='' + Path to a client certificate file for TLS + --client-key='' + Path to a client key file for TLS + --cluster='' + The name of the kubeconfig cluster to use + --context='' + The name of the kubeconfig context to use + --insecure-skip-tls-verify=false + If true, the server`s certificate will not be checked for validity. This will make your + HTTPS connections insecure + --kubeconfig='' + Path to the kubeconfig file to use for CLI requests. + --match-server-version=false + Require server version to match client version + -n, --namespace='' + If present, the namespace scope for this CLI request + --password='' + Password for basic authentication to the API server + --profile='none' + Name of profile to capture. One of (none|cpu|heap|goroutine|threadcreate|block|mutex) + --profile-output='profile.pprof' + Name of the file to write the profile to + --request-timeout='0' + The length of time to wait before giving up on a single server request. Non-zero values + should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don`t + timeout requests. + -s, --server='' + The address and port of the Kubernetes API server + --tls-server-name='' + Server name to use for server certificate validation. If it is not provided, the + hostname used to contact the server is used + --token='' + Bearer token for authentication to the API server + --user='' + The name of the kubeconfig user to use + --username='' + Username for basic authentication to the API server + --warnings-as-errors=false + Treat warnings received from the server as errors and exit with a non-zero exit code +``` + diff --git a/docs/_includes/reference/cli/werf_kubectl_auth.short.md b/docs/_includes/reference/cli/werf_kubectl_auth.short.md new file mode 100644 index 0000000000..ec49fb3f17 --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_auth.short.md @@ -0,0 +1 @@ +inspect authorization \ No newline at end of file diff --git a/docs/_includes/reference/cli/werf_kubectl_auth_can_i.md b/docs/_includes/reference/cli/werf_kubectl_auth_can_i.md new file mode 100644 index 0000000000..54e55b5eae --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_auth_can_i.md @@ -0,0 +1,112 @@ +{% if include.header %} +{% assign header = include.header %} +{% else %} +{% assign header = "###" %} +{% endif %} +Check whether an action is allowed. + + VERB is a logical Kubernetes API verb like 'get', 'list', 'watch', 'delete', etc. TYPE is a Kubernetes resource. Shortcuts and groups will be resolved. NONRESOURCEURL is a partial URL that starts with "/". NAME is the name of a particular Kubernetes resource. This command pairs nicely with impersonation. See --as global flag. + +{{ header }} Syntax + +```shell +werf kubectl auth can-i VERB [TYPE | TYPE/NAME | NONRESOURCEURL] [options] +``` + +{{ header }} Examples + +```shell + # Check to see if I can create pods in any namespace + kubectl auth can-i create pods --all-namespaces + + # Check to see if I can list deployments in my current namespace + kubectl auth can-i list deployments.apps + + # Check to see if I can do everything in my current namespace ("*" means all) + kubectl auth can-i '*' '*' + + # Check to see if I can get the job named "bar" in namespace "foo" + kubectl auth can-i list jobs.batch/bar -n foo + + # Check to see if I can read pod logs + kubectl auth can-i get pods --subresource=log + + # Check to see if I can access the URL /logs/ + kubectl auth can-i get /logs/ + + # List all allowed actions in namespace "foo" + kubectl auth can-i --list --namespace=foo +``` + +{{ header }} Options + +```shell + -A, --all-namespaces=false + If true, check the specified action in all namespaces. + --list=false + If true, prints all allowed actions. + --no-headers=false + If true, prints allowed actions without headers + -q, --quiet=false + If true, suppress output and just return the exit code. + --subresource='' + SubResource such as pod/log or deployment/scale +``` + +{{ header }} Options inherited from parent commands + +```shell + --as='' + Username to impersonate for the operation. User could be a regular user or a service + account in a namespace. + --as-group=[] + Group to impersonate for the operation, this flag can be repeated to specify multiple + groups. + --as-uid='' + UID to impersonate for the operation. + --cache-dir='~/.kube/cache' + Default cache directory + --certificate-authority='' + Path to a cert file for the certificate authority + --client-certificate='' + Path to a client certificate file for TLS + --client-key='' + Path to a client key file for TLS + --cluster='' + The name of the kubeconfig cluster to use + --context='' + The name of the kubeconfig context to use + --insecure-skip-tls-verify=false + If true, the server`s certificate will not be checked for validity. This will make your + HTTPS connections insecure + --kubeconfig='' + Path to the kubeconfig file to use for CLI requests. + --match-server-version=false + Require server version to match client version + -n, --namespace='' + If present, the namespace scope for this CLI request + --password='' + Password for basic authentication to the API server + --profile='none' + Name of profile to capture. One of (none|cpu|heap|goroutine|threadcreate|block|mutex) + --profile-output='profile.pprof' + Name of the file to write the profile to + --request-timeout='0' + The length of time to wait before giving up on a single server request. Non-zero values + should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don`t + timeout requests. + -s, --server='' + The address and port of the Kubernetes API server + --tls-server-name='' + Server name to use for server certificate validation. If it is not provided, the + hostname used to contact the server is used + --token='' + Bearer token for authentication to the API server + --user='' + The name of the kubeconfig user to use + --username='' + Username for basic authentication to the API server + --warnings-as-errors=false + Treat warnings received from the server as errors and exit with a non-zero exit code +``` + diff --git a/docs/_includes/reference/cli/werf_kubectl_auth_can_i.short.md b/docs/_includes/reference/cli/werf_kubectl_auth_can_i.short.md new file mode 100644 index 0000000000..6027e296bc --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_auth_can_i.short.md @@ -0,0 +1 @@ +check whether an action is allowed \ No newline at end of file diff --git a/docs/_includes/reference/cli/werf_kubectl_auth_reconcile.md b/docs/_includes/reference/cli/werf_kubectl_auth_reconcile.md new file mode 100644 index 0000000000..95af2ab919 --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_auth_reconcile.md @@ -0,0 +1,117 @@ +{% if include.header %} +{% assign header = include.header %} +{% else %} +{% assign header = "###" %} +{% endif %} +Reconciles rules for RBAC role, role binding, cluster role, and cluster role binding objects. + + Missing objects are created, and the containing namespace is created for namespaced objects, if required. + + Existing roles are updated to include the permissions in the input objects, and remove extra permissions if --remove-extra-permissions is specified. + + Existing bindings are updated to include the subjects in the input objects, and remove extra subjects if --remove-extra-subjects is specified. + + This is preferred to 'apply' for RBAC resources so that semantically-aware merging of rules and subjects is done. + +{{ header }} Syntax + +```shell +werf kubectl auth reconcile -f FILENAME [options] +``` + +{{ header }} Examples + +```shell + # Reconcile RBAC resources from a file + kubectl auth reconcile -f my-rbac-rules.yaml +``` + +{{ header }} Options + +```shell + --allow-missing-template-keys=true + If true, ignore any errors in templates when a field or map key is missing in the + template. Only applies to golang and jsonpath output formats. + --dry-run='none' + Must be "none", "server", or "client". If client strategy, only print the object that + would be sent, without sending it. If server strategy, submit server-side request + without persisting the resource. + -f, --filename=[] + Filename, directory, or URL to files identifying the resource to reconcile. + -k, --kustomize='' + Process the kustomization directory. This flag can`t be used together with -f or -R. + -o, --output='' + Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile + |jsonpath|jsonpath-as-json|jsonpath-file. + -R, --recursive=false + Process the directory used in -f, --filename recursively. Useful when you want to + manage related manifests organized within the same directory. + --remove-extra-permissions=false + If true, removes extra permissions added to roles + --remove-extra-subjects=false + If true, removes extra subjects added to rolebindings + --show-managed-fields=false + If true, keep the managedFields when printing objects in JSON or YAML format. + --template='' + Template string or path to template file to use when -o=go-template, + -o=go-template-file. The template format is golang templates + [http://golang.org/pkg/text/template/#pkg-overview]. +``` + +{{ header }} Options inherited from parent commands + +```shell + --as='' + Username to impersonate for the operation. User could be a regular user or a service + account in a namespace. + --as-group=[] + Group to impersonate for the operation, this flag can be repeated to specify multiple + groups. + --as-uid='' + UID to impersonate for the operation. + --cache-dir='~/.kube/cache' + Default cache directory + --certificate-authority='' + Path to a cert file for the certificate authority + --client-certificate='' + Path to a client certificate file for TLS + --client-key='' + Path to a client key file for TLS + --cluster='' + The name of the kubeconfig cluster to use + --context='' + The name of the kubeconfig context to use + --insecure-skip-tls-verify=false + If true, the server`s certificate will not be checked for validity. This will make your + HTTPS connections insecure + --kubeconfig='' + Path to the kubeconfig file to use for CLI requests. + --match-server-version=false + Require server version to match client version + -n, --namespace='' + If present, the namespace scope for this CLI request + --password='' + Password for basic authentication to the API server + --profile='none' + Name of profile to capture. One of (none|cpu|heap|goroutine|threadcreate|block|mutex) + --profile-output='profile.pprof' + Name of the file to write the profile to + --request-timeout='0' + The length of time to wait before giving up on a single server request. Non-zero values + should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don`t + timeout requests. + -s, --server='' + The address and port of the Kubernetes API server + --tls-server-name='' + Server name to use for server certificate validation. If it is not provided, the + hostname used to contact the server is used + --token='' + Bearer token for authentication to the API server + --user='' + The name of the kubeconfig user to use + --username='' + Username for basic authentication to the API server + --warnings-as-errors=false + Treat warnings received from the server as errors and exit with a non-zero exit code +``` + diff --git a/docs/_includes/reference/cli/werf_kubectl_auth_reconcile.short.md b/docs/_includes/reference/cli/werf_kubectl_auth_reconcile.short.md new file mode 100644 index 0000000000..5d4a840a64 --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_auth_reconcile.short.md @@ -0,0 +1 @@ +reconciles rules for RBAC role, role binding, cluster role, and cluster role binding objects \ No newline at end of file diff --git a/docs/_includes/reference/cli/werf_kubectl_autoscale.md b/docs/_includes/reference/cli/werf_kubectl_autoscale.md new file mode 100644 index 0000000000..b5be38bb8e --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_autoscale.md @@ -0,0 +1,127 @@ +{% if include.header %} +{% assign header = include.header %} +{% else %} +{% assign header = "###" %} +{% endif %} +Creates an autoscaler that automatically chooses and sets the number of pods that run in a Kubernetes cluster. + + Looks up a deployment, replica set, stateful set, or replication controller by name and creates an autoscaler that uses the given resource as a reference. An autoscaler can automatically increase or decrease number of pods deployed within the system as needed. + +{{ header }} Syntax + +```shell +werf kubectl autoscale (-f FILENAME | TYPE NAME | TYPE/NAME) [--min=MINPODS] --max=MAXPODS [--cpu-percent=CPU] [options] +``` + +{{ header }} Examples + +```shell + # Auto scale a deployment "foo", with the number of pods between 2 and 10, no target CPU utilization specified so a default autoscaling policy will be used + kubectl autoscale deployment foo --min=2 --max=10 + + # Auto scale a replication controller "foo", with the number of pods between 1 and 5, target CPU utilization at 80% + kubectl autoscale rc foo --max=5 --cpu-percent=80 +``` + +{{ header }} Options + +```shell + --allow-missing-template-keys=true + If true, ignore any errors in templates when a field or map key is missing in the + template. Only applies to golang and jsonpath output formats. + --cpu-percent=-1 + The target average CPU utilization (represented as a percent of requested CPU) over all + the pods. If it`s not specified or negative, a default autoscaling policy will be used. + --dry-run='none' + Must be "none", "server", or "client". If client strategy, only print the object that + would be sent, without sending it. If server strategy, submit server-side request + without persisting the resource. + --field-manager='kubectl-autoscale' + Name of the manager used to track field ownership. + -f, --filename=[] + Filename, directory, or URL to files identifying the resource to autoscale. + -k, --kustomize='' + Process the kustomization directory. This flag can`t be used together with -f or -R. + --max=-1 + The upper limit for the number of pods that can be set by the autoscaler. Required. + --min=-1 + The lower limit for the number of pods that can be set by the autoscaler. If it`s not + specified or negative, the server will apply a default value. + --name='' + The name for the newly created object. If not specified, the name of the input resource + will be used. + -o, --output='' + Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile + |jsonpath|jsonpath-as-json|jsonpath-file. + -R, --recursive=false + Process the directory used in -f, --filename recursively. Useful when you want to + manage related manifests organized within the same directory. + --save-config=false + If true, the configuration of current object will be saved in its annotation. + Otherwise, the annotation will be unchanged. This flag is useful when you want to + perform kubectl apply on this object in the future. + --show-managed-fields=false + If true, keep the managedFields when printing objects in JSON or YAML format. + --template='' + Template string or path to template file to use when -o=go-template, + -o=go-template-file. The template format is golang templates + [http://golang.org/pkg/text/template/#pkg-overview]. +``` + +{{ header }} Options inherited from parent commands + +```shell + --as='' + Username to impersonate for the operation. User could be a regular user or a service + account in a namespace. + --as-group=[] + Group to impersonate for the operation, this flag can be repeated to specify multiple + groups. + --as-uid='' + UID to impersonate for the operation. + --cache-dir='~/.kube/cache' + Default cache directory + --certificate-authority='' + Path to a cert file for the certificate authority + --client-certificate='' + Path to a client certificate file for TLS + --client-key='' + Path to a client key file for TLS + --cluster='' + The name of the kubeconfig cluster to use + --context='' + The name of the kubeconfig context to use + --insecure-skip-tls-verify=false + If true, the server`s certificate will not be checked for validity. This will make your + HTTPS connections insecure + --kubeconfig='' + Path to the kubeconfig file to use for CLI requests. + --match-server-version=false + Require server version to match client version + -n, --namespace='' + If present, the namespace scope for this CLI request + --password='' + Password for basic authentication to the API server + --profile='none' + Name of profile to capture. One of (none|cpu|heap|goroutine|threadcreate|block|mutex) + --profile-output='profile.pprof' + Name of the file to write the profile to + --request-timeout='0' + The length of time to wait before giving up on a single server request. Non-zero values + should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don`t + timeout requests. + -s, --server='' + The address and port of the Kubernetes API server + --tls-server-name='' + Server name to use for server certificate validation. If it is not provided, the + hostname used to contact the server is used + --token='' + Bearer token for authentication to the API server + --user='' + The name of the kubeconfig user to use + --username='' + Username for basic authentication to the API server + --warnings-as-errors=false + Treat warnings received from the server as errors and exit with a non-zero exit code +``` + diff --git a/docs/_includes/reference/cli/werf_kubectl_autoscale.short.md b/docs/_includes/reference/cli/werf_kubectl_autoscale.short.md new file mode 100644 index 0000000000..841dc6d8b7 --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_autoscale.short.md @@ -0,0 +1 @@ +auto-scale a deployment, replica set, stateful set, or replication controller \ No newline at end of file diff --git a/docs/_includes/reference/cli/werf_kubectl_certificate.md b/docs/_includes/reference/cli/werf_kubectl_certificate.md new file mode 100644 index 0000000000..d71ca76111 --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_certificate.md @@ -0,0 +1,70 @@ +{% if include.header %} +{% assign header = include.header %} +{% else %} +{% assign header = "###" %} +{% endif %} +Modify certificate resources. + +{{ header }} Syntax + +```shell +werf kubectl certificate SUBCOMMAND +``` + +{{ header }} Options inherited from parent commands + +```shell + --as='' + Username to impersonate for the operation. User could be a regular user or a service + account in a namespace. + --as-group=[] + Group to impersonate for the operation, this flag can be repeated to specify multiple + groups. + --as-uid='' + UID to impersonate for the operation. + --cache-dir='~/.kube/cache' + Default cache directory + --certificate-authority='' + Path to a cert file for the certificate authority + --client-certificate='' + Path to a client certificate file for TLS + --client-key='' + Path to a client key file for TLS + --cluster='' + The name of the kubeconfig cluster to use + --context='' + The name of the kubeconfig context to use + --insecure-skip-tls-verify=false + If true, the server`s certificate will not be checked for validity. This will make your + HTTPS connections insecure + --kubeconfig='' + Path to the kubeconfig file to use for CLI requests. + --match-server-version=false + Require server version to match client version + -n, --namespace='' + If present, the namespace scope for this CLI request + --password='' + Password for basic authentication to the API server + --profile='none' + Name of profile to capture. One of (none|cpu|heap|goroutine|threadcreate|block|mutex) + --profile-output='profile.pprof' + Name of the file to write the profile to + --request-timeout='0' + The length of time to wait before giving up on a single server request. Non-zero values + should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don`t + timeout requests. + -s, --server='' + The address and port of the Kubernetes API server + --tls-server-name='' + Server name to use for server certificate validation. If it is not provided, the + hostname used to contact the server is used + --token='' + Bearer token for authentication to the API server + --user='' + The name of the kubeconfig user to use + --username='' + Username for basic authentication to the API server + --warnings-as-errors=false + Treat warnings received from the server as errors and exit with a non-zero exit code +``` + diff --git a/docs/_includes/reference/cli/werf_kubectl_certificate.short.md b/docs/_includes/reference/cli/werf_kubectl_certificate.short.md new file mode 100644 index 0000000000..bfe4781ed8 --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_certificate.short.md @@ -0,0 +1 @@ +modify certificate resources. \ No newline at end of file diff --git a/docs/_includes/reference/cli/werf_kubectl_certificate_approve.md b/docs/_includes/reference/cli/werf_kubectl_certificate_approve.md new file mode 100644 index 0000000000..ae4a86a0e9 --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_certificate_approve.md @@ -0,0 +1,107 @@ +{% if include.header %} +{% assign header = include.header %} +{% else %} +{% assign header = "###" %} +{% endif %} +Approve a certificate signing request. + + kubectl certificate approve allows a cluster admin to approve a certificate signing request (CSR). This action tells a certificate signing controller to issue a certificate to the requestor with the attributes requested in the CSR. + + SECURITY NOTICE: Depending on the requested attributes, the issued certificate can potentially grant a requester access to cluster resources or to authenticate as a requested identity. Before approving a CSR, ensure you understand what the signed certificate can do. + +{{ header }} Syntax + +```shell +werf kubectl certificate approve (-f FILENAME | NAME) [options] +``` + +{{ header }} Examples + +```shell + # Approve CSR 'csr-sqgzp' + kubectl certificate approve csr-sqgzp +``` + +{{ header }} Options + +```shell + --allow-missing-template-keys=true + If true, ignore any errors in templates when a field or map key is missing in the + template. Only applies to golang and jsonpath output formats. + -f, --filename=[] + Filename, directory, or URL to files identifying the resource to update + --force=false + Update the CSR even if it is already approved. + -k, --kustomize='' + Process the kustomization directory. This flag can`t be used together with -f or -R. + -o, --output='' + Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile + |jsonpath|jsonpath-as-json|jsonpath-file. + -R, --recursive=false + Process the directory used in -f, --filename recursively. Useful when you want to + manage related manifests organized within the same directory. + --show-managed-fields=false + If true, keep the managedFields when printing objects in JSON or YAML format. + --template='' + Template string or path to template file to use when -o=go-template, + -o=go-template-file. The template format is golang templates + [http://golang.org/pkg/text/template/#pkg-overview]. +``` + +{{ header }} Options inherited from parent commands + +```shell + --as='' + Username to impersonate for the operation. User could be a regular user or a service + account in a namespace. + --as-group=[] + Group to impersonate for the operation, this flag can be repeated to specify multiple + groups. + --as-uid='' + UID to impersonate for the operation. + --cache-dir='~/.kube/cache' + Default cache directory + --certificate-authority='' + Path to a cert file for the certificate authority + --client-certificate='' + Path to a client certificate file for TLS + --client-key='' + Path to a client key file for TLS + --cluster='' + The name of the kubeconfig cluster to use + --context='' + The name of the kubeconfig context to use + --insecure-skip-tls-verify=false + If true, the server`s certificate will not be checked for validity. This will make your + HTTPS connections insecure + --kubeconfig='' + Path to the kubeconfig file to use for CLI requests. + --match-server-version=false + Require server version to match client version + -n, --namespace='' + If present, the namespace scope for this CLI request + --password='' + Password for basic authentication to the API server + --profile='none' + Name of profile to capture. One of (none|cpu|heap|goroutine|threadcreate|block|mutex) + --profile-output='profile.pprof' + Name of the file to write the profile to + --request-timeout='0' + The length of time to wait before giving up on a single server request. Non-zero values + should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don`t + timeout requests. + -s, --server='' + The address and port of the Kubernetes API server + --tls-server-name='' + Server name to use for server certificate validation. If it is not provided, the + hostname used to contact the server is used + --token='' + Bearer token for authentication to the API server + --user='' + The name of the kubeconfig user to use + --username='' + Username for basic authentication to the API server + --warnings-as-errors=false + Treat warnings received from the server as errors and exit with a non-zero exit code +``` + diff --git a/docs/_includes/reference/cli/werf_kubectl_certificate_approve.short.md b/docs/_includes/reference/cli/werf_kubectl_certificate_approve.short.md new file mode 100644 index 0000000000..bf84cd4301 --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_certificate_approve.short.md @@ -0,0 +1 @@ +approve a certificate signing request \ No newline at end of file diff --git a/docs/_includes/reference/cli/werf_kubectl_certificate_deny.md b/docs/_includes/reference/cli/werf_kubectl_certificate_deny.md new file mode 100644 index 0000000000..703632712e --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_certificate_deny.md @@ -0,0 +1,105 @@ +{% if include.header %} +{% assign header = include.header %} +{% else %} +{% assign header = "###" %} +{% endif %} +Deny a certificate signing request. + + kubectl certificate deny allows a cluster admin to deny a certificate signing request (CSR). This action tells a certificate signing controller to not to issue a certificate to the requestor. + +{{ header }} Syntax + +```shell +werf kubectl certificate deny (-f FILENAME | NAME) [options] +``` + +{{ header }} Examples + +```shell + # Deny CSR 'csr-sqgzp' + kubectl certificate deny csr-sqgzp +``` + +{{ header }} Options + +```shell + --allow-missing-template-keys=true + If true, ignore any errors in templates when a field or map key is missing in the + template. Only applies to golang and jsonpath output formats. + -f, --filename=[] + Filename, directory, or URL to files identifying the resource to update + --force=false + Update the CSR even if it is already denied. + -k, --kustomize='' + Process the kustomization directory. This flag can`t be used together with -f or -R. + -o, --output='' + Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile + |jsonpath|jsonpath-as-json|jsonpath-file. + -R, --recursive=false + Process the directory used in -f, --filename recursively. Useful when you want to + manage related manifests organized within the same directory. + --show-managed-fields=false + If true, keep the managedFields when printing objects in JSON or YAML format. + --template='' + Template string or path to template file to use when -o=go-template, + -o=go-template-file. The template format is golang templates + [http://golang.org/pkg/text/template/#pkg-overview]. +``` + +{{ header }} Options inherited from parent commands + +```shell + --as='' + Username to impersonate for the operation. User could be a regular user or a service + account in a namespace. + --as-group=[] + Group to impersonate for the operation, this flag can be repeated to specify multiple + groups. + --as-uid='' + UID to impersonate for the operation. + --cache-dir='~/.kube/cache' + Default cache directory + --certificate-authority='' + Path to a cert file for the certificate authority + --client-certificate='' + Path to a client certificate file for TLS + --client-key='' + Path to a client key file for TLS + --cluster='' + The name of the kubeconfig cluster to use + --context='' + The name of the kubeconfig context to use + --insecure-skip-tls-verify=false + If true, the server`s certificate will not be checked for validity. This will make your + HTTPS connections insecure + --kubeconfig='' + Path to the kubeconfig file to use for CLI requests. + --match-server-version=false + Require server version to match client version + -n, --namespace='' + If present, the namespace scope for this CLI request + --password='' + Password for basic authentication to the API server + --profile='none' + Name of profile to capture. One of (none|cpu|heap|goroutine|threadcreate|block|mutex) + --profile-output='profile.pprof' + Name of the file to write the profile to + --request-timeout='0' + The length of time to wait before giving up on a single server request. Non-zero values + should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don`t + timeout requests. + -s, --server='' + The address and port of the Kubernetes API server + --tls-server-name='' + Server name to use for server certificate validation. If it is not provided, the + hostname used to contact the server is used + --token='' + Bearer token for authentication to the API server + --user='' + The name of the kubeconfig user to use + --username='' + Username for basic authentication to the API server + --warnings-as-errors=false + Treat warnings received from the server as errors and exit with a non-zero exit code +``` + diff --git a/docs/_includes/reference/cli/werf_kubectl_certificate_deny.short.md b/docs/_includes/reference/cli/werf_kubectl_certificate_deny.short.md new file mode 100644 index 0000000000..6e8f02aaee --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_certificate_deny.short.md @@ -0,0 +1 @@ +deny a certificate signing request \ No newline at end of file diff --git a/docs/_includes/reference/cli/werf_kubectl_cluster_info.md b/docs/_includes/reference/cli/werf_kubectl_cluster_info.md new file mode 100644 index 0000000000..1ce91010e8 --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_cluster_info.md @@ -0,0 +1,77 @@ +{% if include.header %} +{% assign header = include.header %} +{% else %} +{% assign header = "###" %} +{% endif %} +Display addresses of the control plane and services with label [kubernetes.io/cluster-service=true](kubernetes.io/cluster-service=true). To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'. + +{{ header }} Syntax + +```shell +werf kubectl cluster-info +``` + +{{ header }} Examples + +```shell + # Print the address of the control plane and cluster services + kubectl cluster-info +``` + +{{ header }} Options inherited from parent commands + +```shell + --as='' + Username to impersonate for the operation. User could be a regular user or a service + account in a namespace. + --as-group=[] + Group to impersonate for the operation, this flag can be repeated to specify multiple + groups. + --as-uid='' + UID to impersonate for the operation. + --cache-dir='~/.kube/cache' + Default cache directory + --certificate-authority='' + Path to a cert file for the certificate authority + --client-certificate='' + Path to a client certificate file for TLS + --client-key='' + Path to a client key file for TLS + --cluster='' + The name of the kubeconfig cluster to use + --context='' + The name of the kubeconfig context to use + --insecure-skip-tls-verify=false + If true, the server`s certificate will not be checked for validity. This will make your + HTTPS connections insecure + --kubeconfig='' + Path to the kubeconfig file to use for CLI requests. + --match-server-version=false + Require server version to match client version + -n, --namespace='' + If present, the namespace scope for this CLI request + --password='' + Password for basic authentication to the API server + --profile='none' + Name of profile to capture. One of (none|cpu|heap|goroutine|threadcreate|block|mutex) + --profile-output='profile.pprof' + Name of the file to write the profile to + --request-timeout='0' + The length of time to wait before giving up on a single server request. Non-zero values + should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don`t + timeout requests. + -s, --server='' + The address and port of the Kubernetes API server + --tls-server-name='' + Server name to use for server certificate validation. If it is not provided, the + hostname used to contact the server is used + --token='' + Bearer token for authentication to the API server + --user='' + The name of the kubeconfig user to use + --username='' + Username for basic authentication to the API server + --warnings-as-errors=false + Treat warnings received from the server as errors and exit with a non-zero exit code +``` + diff --git a/docs/_includes/reference/cli/werf_kubectl_cluster_info.short.md b/docs/_includes/reference/cli/werf_kubectl_cluster_info.short.md new file mode 100644 index 0000000000..4d3f2abc0f --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_cluster_info.short.md @@ -0,0 +1 @@ +display cluster information \ No newline at end of file diff --git a/docs/_includes/reference/cli/werf_kubectl_cluster_info_dump.md b/docs/_includes/reference/cli/werf_kubectl_cluster_info_dump.md new file mode 100644 index 0000000000..bbecb960da --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_cluster_info_dump.md @@ -0,0 +1,115 @@ +{% if include.header %} +{% assign header = include.header %} +{% else %} +{% assign header = "###" %} +{% endif %} +Dump cluster information out suitable for debugging and diagnosing cluster problems. By default, dumps everything to stdout. You can optionally specify a directory with --output-directory. If you specify a directory, Kubernetes will build a set of files in that directory. By default, only dumps things in the current namespace and 'kube-system' namespace, but you can switch to a different namespace with the --namespaces flag, or specify --all-namespaces to dump all namespaces. + + The command also dumps the logs of all of the pods in the cluster; these logs are dumped into different directories based on namespace and pod name. + +{{ header }} Syntax + +```shell +werf kubectl cluster-info dump [flags] [options] +``` + +{{ header }} Examples + +```shell + # Dump current cluster state to stdout + kubectl cluster-info dump + + # Dump current cluster state to /path/to/cluster-state + kubectl cluster-info dump --output-directory=/path/to/cluster-state + + # Dump all namespaces to stdout + kubectl cluster-info dump --all-namespaces + + # Dump a set of namespaces to /path/to/cluster-state + kubectl cluster-info dump --namespaces default,kube-system --output-directory=/path/to/cluster-state +``` + +{{ header }} Options + +```shell + -A, --all-namespaces=false + If true, dump all namespaces. If true, --namespaces is ignored. + --allow-missing-template-keys=true + If true, ignore any errors in templates when a field or map key is missing in the + template. Only applies to golang and jsonpath output formats. + --namespaces=[] + A comma separated list of namespaces to dump. + -o, --output='json' + Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile + |jsonpath|jsonpath-as-json|jsonpath-file. + --output-directory='' + Where to output the files. If empty or `-` uses stdout, otherwise creates a directory + hierarchy in that directory + --pod-running-timeout=20s + The length of time (like 5s, 2m, or 3h, higher than zero) to wait until at least one + pod is running + --show-managed-fields=false + If true, keep the managedFields when printing objects in JSON or YAML format. + --template='' + Template string or path to template file to use when -o=go-template, + -o=go-template-file. The template format is golang templates + [http://golang.org/pkg/text/template/#pkg-overview]. +``` + +{{ header }} Options inherited from parent commands + +```shell + --as='' + Username to impersonate for the operation. User could be a regular user or a service + account in a namespace. + --as-group=[] + Group to impersonate for the operation, this flag can be repeated to specify multiple + groups. + --as-uid='' + UID to impersonate for the operation. + --cache-dir='~/.kube/cache' + Default cache directory + --certificate-authority='' + Path to a cert file for the certificate authority + --client-certificate='' + Path to a client certificate file for TLS + --client-key='' + Path to a client key file for TLS + --cluster='' + The name of the kubeconfig cluster to use + --context='' + The name of the kubeconfig context to use + --insecure-skip-tls-verify=false + If true, the server`s certificate will not be checked for validity. This will make your + HTTPS connections insecure + --kubeconfig='' + Path to the kubeconfig file to use for CLI requests. + --match-server-version=false + Require server version to match client version + -n, --namespace='' + If present, the namespace scope for this CLI request + --password='' + Password for basic authentication to the API server + --profile='none' + Name of profile to capture. One of (none|cpu|heap|goroutine|threadcreate|block|mutex) + --profile-output='profile.pprof' + Name of the file to write the profile to + --request-timeout='0' + The length of time to wait before giving up on a single server request. Non-zero values + should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don`t + timeout requests. + -s, --server='' + The address and port of the Kubernetes API server + --tls-server-name='' + Server name to use for server certificate validation. If it is not provided, the + hostname used to contact the server is used + --token='' + Bearer token for authentication to the API server + --user='' + The name of the kubeconfig user to use + --username='' + Username for basic authentication to the API server + --warnings-as-errors=false + Treat warnings received from the server as errors and exit with a non-zero exit code +``` + diff --git a/docs/_includes/reference/cli/werf_kubectl_cluster_info_dump.short.md b/docs/_includes/reference/cli/werf_kubectl_cluster_info_dump.short.md new file mode 100644 index 0000000000..265ecc3a16 --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_cluster_info_dump.short.md @@ -0,0 +1 @@ +dump relevant information for debugging and diagnosis \ No newline at end of file diff --git a/docs/_includes/reference/cli/werf_kubectl_completion.md b/docs/_includes/reference/cli/werf_kubectl_completion.md new file mode 100644 index 0000000000..80022967a4 --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_completion.md @@ -0,0 +1,134 @@ +{% if include.header %} +{% assign header = include.header %} +{% else %} +{% assign header = "###" %} +{% endif %} +Output shell completion code for the specified shell (bash, zsh, fish, or powershell). The shell code must be evaluated to provide interactive completion of kubectl commands. This can be done by sourcing it from the .bash_profile. + + Detailed instructions on how to do this are available here: + + for macOS: + [https://kubernetes.io/docs/tasks/tools/install-kubectl-macos/#enable-shell-autocompletion](https://kubernetes.io/docs/tasks/tools/install-kubectl-macos/#enable-shell-autocompletion) + + for linux: + [https://kubernetes.io/docs/tasks/tools/install-kubectl-linux/#enable-shell-autocompletion](https://kubernetes.io/docs/tasks/tools/install-kubectl-linux/#enable-shell-autocompletion) + + for windows: + [https://kubernetes.io/docs/tasks/tools/install-kubectl-windows/#enable-shell-autocompletion](https://kubernetes.io/docs/tasks/tools/install-kubectl-windows/#enable-shell-autocompletion) + + Note for zsh users: [1] zsh completions are only supported in versions of zsh >= 5.2. + +{{ header }} Syntax + +```shell +werf kubectl completion SHELL +``` + +{{ header }} Examples + +```shell + # Installing bash completion on macOS using homebrew + ## If running Bash 3.2 included with macOS + brew install bash-completion + ## or, if running Bash 4.1+ + brew install bash-completion@2 + ## If kubectl is installed via homebrew, this should start working immediately + ## If you've installed via other means, you may need add the completion to your completion directory + kubectl completion bash > $(brew --prefix)/etc/bash_completion.d/kubectl + + + # Installing bash completion on Linux + ## If bash-completion is not installed on Linux, install the 'bash-completion' package + ## via your distribution's package manager. + ## Load the kubectl completion code for bash into the current shell + source <(kubectl completion bash) + ## Write bash completion code to a file and source it from .bash_profile + kubectl completion bash > ~/.kube/completion.bash.inc + printf " + # Kubectl shell completion + source '$HOME/.kube/completion.bash.inc' + " >> $HOME/.bash_profile + source $HOME/.bash_profile + + # Load the kubectl completion code for zsh[1] into the current shell + source <(kubectl completion zsh) + # Set the kubectl completion code for zsh[1] to autoload on startup + kubectl completion zsh > "${fpath[1]}/_kubectl" + + + # Load the kubectl completion code for fish[2] into the current shell + kubectl completion fish | source + # To load completions for each session, execute once: + kubectl completion fish > ~/.config/fish/completions/kubectl.fish + + # Load the kubectl completion code for powershell into the current shell + kubectl completion powershell | Out-String | Invoke-Expression + # Set kubectl completion code for powershell to run on startup + ## Save completion code to a script and execute in the profile + kubectl completion powershell > $HOME\.kube\completion.ps1 + Add-Content $PROFILE "$HOME\.kube\completion.ps1" + ## Execute completion code in the profile + Add-Content $PROFILE "if (Get-Command kubectl -ErrorAction SilentlyContinue) { + kubectl completion powershell | Out-String | Invoke-Expression + }" + ## Add completion code directly to the $PROFILE script + kubectl completion powershell >> $PROFILE +``` + +{{ header }} Options inherited from parent commands + +```shell + --as='' + Username to impersonate for the operation. User could be a regular user or a service + account in a namespace. + --as-group=[] + Group to impersonate for the operation, this flag can be repeated to specify multiple + groups. + --as-uid='' + UID to impersonate for the operation. + --cache-dir='~/.kube/cache' + Default cache directory + --certificate-authority='' + Path to a cert file for the certificate authority + --client-certificate='' + Path to a client certificate file for TLS + --client-key='' + Path to a client key file for TLS + --cluster='' + The name of the kubeconfig cluster to use + --context='' + The name of the kubeconfig context to use + --insecure-skip-tls-verify=false + If true, the server`s certificate will not be checked for validity. This will make your + HTTPS connections insecure + --kubeconfig='' + Path to the kubeconfig file to use for CLI requests. + --match-server-version=false + Require server version to match client version + -n, --namespace='' + If present, the namespace scope for this CLI request + --password='' + Password for basic authentication to the API server + --profile='none' + Name of profile to capture. One of (none|cpu|heap|goroutine|threadcreate|block|mutex) + --profile-output='profile.pprof' + Name of the file to write the profile to + --request-timeout='0' + The length of time to wait before giving up on a single server request. Non-zero values + should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don`t + timeout requests. + -s, --server='' + The address and port of the Kubernetes API server + --tls-server-name='' + Server name to use for server certificate validation. If it is not provided, the + hostname used to contact the server is used + --token='' + Bearer token for authentication to the API server + --user='' + The name of the kubeconfig user to use + --username='' + Username for basic authentication to the API server + --warnings-as-errors=false + Treat warnings received from the server as errors and exit with a non-zero exit code +``` + diff --git a/docs/_includes/reference/cli/werf_kubectl_completion.short.md b/docs/_includes/reference/cli/werf_kubectl_completion.short.md new file mode 100644 index 0000000000..3ee5571dd1 --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_completion.short.md @@ -0,0 +1 @@ +output shell completion code for the specified shell (bash, zsh or fish) \ No newline at end of file diff --git a/docs/_includes/reference/cli/werf_kubectl_config.md b/docs/_includes/reference/cli/werf_kubectl_config.md new file mode 100644 index 0000000000..d41b224489 --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_config.md @@ -0,0 +1,76 @@ +{% if include.header %} +{% assign header = include.header %} +{% else %} +{% assign header = "###" %} +{% endif %} +Modify kubeconfig files using subcommands like "kubectl config set current-context my-context" + + The loading order follows these rules: + + 1. If the --kubeconfig flag is set, then only that file is loaded. The flag may only be set once and no merging takes place. + 2. If $KUBECONFIG environment variable is set, then it is used as a list of paths (normal path delimiting rules for your system). These paths are merged. When a value is modified, it is modified in the file that defines the stanza. When a value is created, it is created in the first file that exists. If no files in the chain exist, then it creates the last file in the list. + 3. Otherwise, ${HOME}/.kube/config is used and no merging takes place. + +{{ header }} Syntax + +```shell +werf kubectl config SUBCOMMAND +``` + +{{ header }} Options inherited from parent commands + +```shell + --as='' + Username to impersonate for the operation. User could be a regular user or a service + account in a namespace. + --as-group=[] + Group to impersonate for the operation, this flag can be repeated to specify multiple + groups. + --as-uid='' + UID to impersonate for the operation. + --cache-dir='~/.kube/cache' + Default cache directory + --certificate-authority='' + Path to a cert file for the certificate authority + --client-certificate='' + Path to a client certificate file for TLS + --client-key='' + Path to a client key file for TLS + --cluster='' + The name of the kubeconfig cluster to use + --context='' + The name of the kubeconfig context to use + --insecure-skip-tls-verify=false + If true, the server`s certificate will not be checked for validity. This will make your + HTTPS connections insecure + --kubeconfig='' + Path to the kubeconfig file to use for CLI requests. + --match-server-version=false + Require server version to match client version + -n, --namespace='' + If present, the namespace scope for this CLI request + --password='' + Password for basic authentication to the API server + --profile='none' + Name of profile to capture. One of (none|cpu|heap|goroutine|threadcreate|block|mutex) + --profile-output='profile.pprof' + Name of the file to write the profile to + --request-timeout='0' + The length of time to wait before giving up on a single server request. Non-zero values + should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don`t + timeout requests. + -s, --server='' + The address and port of the Kubernetes API server + --tls-server-name='' + Server name to use for server certificate validation. If it is not provided, the + hostname used to contact the server is used + --token='' + Bearer token for authentication to the API server + --user='' + The name of the kubeconfig user to use + --username='' + Username for basic authentication to the API server + --warnings-as-errors=false + Treat warnings received from the server as errors and exit with a non-zero exit code +``` + diff --git a/docs/_includes/reference/cli/werf_kubectl_config.short.md b/docs/_includes/reference/cli/werf_kubectl_config.short.md new file mode 100644 index 0000000000..4ab13635ea --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_config.short.md @@ -0,0 +1 @@ +modify kubeconfig files \ No newline at end of file diff --git a/docs/_includes/reference/cli/werf_kubectl_config_current_context.md b/docs/_includes/reference/cli/werf_kubectl_config_current_context.md new file mode 100644 index 0000000000..50c3caaabd --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_config_current_context.md @@ -0,0 +1,77 @@ +{% if include.header %} +{% assign header = include.header %} +{% else %} +{% assign header = "###" %} +{% endif %} +Display the current-context. + +{{ header }} Syntax + +```shell +werf kubectl config current-context +``` + +{{ header }} Examples + +```shell + # Display the current-context + kubectl config current-context +``` + +{{ header }} Options inherited from parent commands + +```shell + --as='' + Username to impersonate for the operation. User could be a regular user or a service + account in a namespace. + --as-group=[] + Group to impersonate for the operation, this flag can be repeated to specify multiple + groups. + --as-uid='' + UID to impersonate for the operation. + --cache-dir='~/.kube/cache' + Default cache directory + --certificate-authority='' + Path to a cert file for the certificate authority + --client-certificate='' + Path to a client certificate file for TLS + --client-key='' + Path to a client key file for TLS + --cluster='' + The name of the kubeconfig cluster to use + --context='' + The name of the kubeconfig context to use + --insecure-skip-tls-verify=false + If true, the server`s certificate will not be checked for validity. This will make your + HTTPS connections insecure + --kubeconfig='' + use a particular kubeconfig file + --match-server-version=false + Require server version to match client version + -n, --namespace='' + If present, the namespace scope for this CLI request + --password='' + Password for basic authentication to the API server + --profile='none' + Name of profile to capture. One of (none|cpu|heap|goroutine|threadcreate|block|mutex) + --profile-output='profile.pprof' + Name of the file to write the profile to + --request-timeout='0' + The length of time to wait before giving up on a single server request. Non-zero values + should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don`t + timeout requests. + -s, --server='' + The address and port of the Kubernetes API server + --tls-server-name='' + Server name to use for server certificate validation. If it is not provided, the + hostname used to contact the server is used + --token='' + Bearer token for authentication to the API server + --user='' + The name of the kubeconfig user to use + --username='' + Username for basic authentication to the API server + --warnings-as-errors=false + Treat warnings received from the server as errors and exit with a non-zero exit code +``` + diff --git a/docs/_includes/reference/cli/werf_kubectl_config_current_context.short.md b/docs/_includes/reference/cli/werf_kubectl_config_current_context.short.md new file mode 100644 index 0000000000..27ad72f414 --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_config_current_context.short.md @@ -0,0 +1 @@ +display the current-context \ No newline at end of file diff --git a/docs/_includes/reference/cli/werf_kubectl_config_delete_cluster.md b/docs/_includes/reference/cli/werf_kubectl_config_delete_cluster.md new file mode 100644 index 0000000000..d44a8c6246 --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_config_delete_cluster.md @@ -0,0 +1,77 @@ +{% if include.header %} +{% assign header = include.header %} +{% else %} +{% assign header = "###" %} +{% endif %} +Delete the specified cluster from the kubeconfig. + +{{ header }} Syntax + +```shell +werf kubectl config delete-cluster NAME +``` + +{{ header }} Examples + +```shell + # Delete the minikube cluster + kubectl config delete-cluster minikube +``` + +{{ header }} Options inherited from parent commands + +```shell + --as='' + Username to impersonate for the operation. User could be a regular user or a service + account in a namespace. + --as-group=[] + Group to impersonate for the operation, this flag can be repeated to specify multiple + groups. + --as-uid='' + UID to impersonate for the operation. + --cache-dir='~/.kube/cache' + Default cache directory + --certificate-authority='' + Path to a cert file for the certificate authority + --client-certificate='' + Path to a client certificate file for TLS + --client-key='' + Path to a client key file for TLS + --cluster='' + The name of the kubeconfig cluster to use + --context='' + The name of the kubeconfig context to use + --insecure-skip-tls-verify=false + If true, the server`s certificate will not be checked for validity. This will make your + HTTPS connections insecure + --kubeconfig='' + use a particular kubeconfig file + --match-server-version=false + Require server version to match client version + -n, --namespace='' + If present, the namespace scope for this CLI request + --password='' + Password for basic authentication to the API server + --profile='none' + Name of profile to capture. One of (none|cpu|heap|goroutine|threadcreate|block|mutex) + --profile-output='profile.pprof' + Name of the file to write the profile to + --request-timeout='0' + The length of time to wait before giving up on a single server request. Non-zero values + should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don`t + timeout requests. + -s, --server='' + The address and port of the Kubernetes API server + --tls-server-name='' + Server name to use for server certificate validation. If it is not provided, the + hostname used to contact the server is used + --token='' + Bearer token for authentication to the API server + --user='' + The name of the kubeconfig user to use + --username='' + Username for basic authentication to the API server + --warnings-as-errors=false + Treat warnings received from the server as errors and exit with a non-zero exit code +``` + diff --git a/docs/_includes/reference/cli/werf_kubectl_config_delete_cluster.short.md b/docs/_includes/reference/cli/werf_kubectl_config_delete_cluster.short.md new file mode 100644 index 0000000000..5fe39aee0e --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_config_delete_cluster.short.md @@ -0,0 +1 @@ +delete the specified cluster from the kubeconfig \ No newline at end of file diff --git a/docs/_includes/reference/cli/werf_kubectl_config_delete_context.md b/docs/_includes/reference/cli/werf_kubectl_config_delete_context.md new file mode 100644 index 0000000000..ac8d312c90 --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_config_delete_context.md @@ -0,0 +1,77 @@ +{% if include.header %} +{% assign header = include.header %} +{% else %} +{% assign header = "###" %} +{% endif %} +Delete the specified context from the kubeconfig. + +{{ header }} Syntax + +```shell +werf kubectl config delete-context NAME +``` + +{{ header }} Examples + +```shell + # Delete the context for the minikube cluster + kubectl config delete-context minikube +``` + +{{ header }} Options inherited from parent commands + +```shell + --as='' + Username to impersonate for the operation. User could be a regular user or a service + account in a namespace. + --as-group=[] + Group to impersonate for the operation, this flag can be repeated to specify multiple + groups. + --as-uid='' + UID to impersonate for the operation. + --cache-dir='~/.kube/cache' + Default cache directory + --certificate-authority='' + Path to a cert file for the certificate authority + --client-certificate='' + Path to a client certificate file for TLS + --client-key='' + Path to a client key file for TLS + --cluster='' + The name of the kubeconfig cluster to use + --context='' + The name of the kubeconfig context to use + --insecure-skip-tls-verify=false + If true, the server`s certificate will not be checked for validity. This will make your + HTTPS connections insecure + --kubeconfig='' + use a particular kubeconfig file + --match-server-version=false + Require server version to match client version + -n, --namespace='' + If present, the namespace scope for this CLI request + --password='' + Password for basic authentication to the API server + --profile='none' + Name of profile to capture. One of (none|cpu|heap|goroutine|threadcreate|block|mutex) + --profile-output='profile.pprof' + Name of the file to write the profile to + --request-timeout='0' + The length of time to wait before giving up on a single server request. Non-zero values + should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don`t + timeout requests. + -s, --server='' + The address and port of the Kubernetes API server + --tls-server-name='' + Server name to use for server certificate validation. If it is not provided, the + hostname used to contact the server is used + --token='' + Bearer token for authentication to the API server + --user='' + The name of the kubeconfig user to use + --username='' + Username for basic authentication to the API server + --warnings-as-errors=false + Treat warnings received from the server as errors and exit with a non-zero exit code +``` + diff --git a/docs/_includes/reference/cli/werf_kubectl_config_delete_context.short.md b/docs/_includes/reference/cli/werf_kubectl_config_delete_context.short.md new file mode 100644 index 0000000000..565162aae3 --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_config_delete_context.short.md @@ -0,0 +1 @@ +delete the specified context from the kubeconfig \ No newline at end of file diff --git a/docs/_includes/reference/cli/werf_kubectl_config_delete_user.md b/docs/_includes/reference/cli/werf_kubectl_config_delete_user.md new file mode 100644 index 0000000000..5e9b02c747 --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_config_delete_user.md @@ -0,0 +1,77 @@ +{% if include.header %} +{% assign header = include.header %} +{% else %} +{% assign header = "###" %} +{% endif %} +Delete the specified user from the kubeconfig. + +{{ header }} Syntax + +```shell +werf kubectl config delete-user NAME +``` + +{{ header }} Examples + +```shell + # Delete the minikube user + kubectl config delete-user minikube +``` + +{{ header }} Options inherited from parent commands + +```shell + --as='' + Username to impersonate for the operation. User could be a regular user or a service + account in a namespace. + --as-group=[] + Group to impersonate for the operation, this flag can be repeated to specify multiple + groups. + --as-uid='' + UID to impersonate for the operation. + --cache-dir='~/.kube/cache' + Default cache directory + --certificate-authority='' + Path to a cert file for the certificate authority + --client-certificate='' + Path to a client certificate file for TLS + --client-key='' + Path to a client key file for TLS + --cluster='' + The name of the kubeconfig cluster to use + --context='' + The name of the kubeconfig context to use + --insecure-skip-tls-verify=false + If true, the server`s certificate will not be checked for validity. This will make your + HTTPS connections insecure + --kubeconfig='' + use a particular kubeconfig file + --match-server-version=false + Require server version to match client version + -n, --namespace='' + If present, the namespace scope for this CLI request + --password='' + Password for basic authentication to the API server + --profile='none' + Name of profile to capture. One of (none|cpu|heap|goroutine|threadcreate|block|mutex) + --profile-output='profile.pprof' + Name of the file to write the profile to + --request-timeout='0' + The length of time to wait before giving up on a single server request. Non-zero values + should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don`t + timeout requests. + -s, --server='' + The address and port of the Kubernetes API server + --tls-server-name='' + Server name to use for server certificate validation. If it is not provided, the + hostname used to contact the server is used + --token='' + Bearer token for authentication to the API server + --user='' + The name of the kubeconfig user to use + --username='' + Username for basic authentication to the API server + --warnings-as-errors=false + Treat warnings received from the server as errors and exit with a non-zero exit code +``` + diff --git a/docs/_includes/reference/cli/werf_kubectl_config_delete_user.short.md b/docs/_includes/reference/cli/werf_kubectl_config_delete_user.short.md new file mode 100644 index 0000000000..04977c50d7 --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_config_delete_user.short.md @@ -0,0 +1 @@ +delete the specified user from the kubeconfig \ No newline at end of file diff --git a/docs/_includes/reference/cli/werf_kubectl_config_get_clusters.md b/docs/_includes/reference/cli/werf_kubectl_config_get_clusters.md new file mode 100644 index 0000000000..31c8a11572 --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_config_get_clusters.md @@ -0,0 +1,77 @@ +{% if include.header %} +{% assign header = include.header %} +{% else %} +{% assign header = "###" %} +{% endif %} +Display clusters defined in the kubeconfig. + +{{ header }} Syntax + +```shell +werf kubectl config get-clusters +``` + +{{ header }} Examples + +```shell + # List the clusters that kubectl knows about + kubectl config get-clusters +``` + +{{ header }} Options inherited from parent commands + +```shell + --as='' + Username to impersonate for the operation. User could be a regular user or a service + account in a namespace. + --as-group=[] + Group to impersonate for the operation, this flag can be repeated to specify multiple + groups. + --as-uid='' + UID to impersonate for the operation. + --cache-dir='~/.kube/cache' + Default cache directory + --certificate-authority='' + Path to a cert file for the certificate authority + --client-certificate='' + Path to a client certificate file for TLS + --client-key='' + Path to a client key file for TLS + --cluster='' + The name of the kubeconfig cluster to use + --context='' + The name of the kubeconfig context to use + --insecure-skip-tls-verify=false + If true, the server`s certificate will not be checked for validity. This will make your + HTTPS connections insecure + --kubeconfig='' + use a particular kubeconfig file + --match-server-version=false + Require server version to match client version + -n, --namespace='' + If present, the namespace scope for this CLI request + --password='' + Password for basic authentication to the API server + --profile='none' + Name of profile to capture. One of (none|cpu|heap|goroutine|threadcreate|block|mutex) + --profile-output='profile.pprof' + Name of the file to write the profile to + --request-timeout='0' + The length of time to wait before giving up on a single server request. Non-zero values + should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don`t + timeout requests. + -s, --server='' + The address and port of the Kubernetes API server + --tls-server-name='' + Server name to use for server certificate validation. If it is not provided, the + hostname used to contact the server is used + --token='' + Bearer token for authentication to the API server + --user='' + The name of the kubeconfig user to use + --username='' + Username for basic authentication to the API server + --warnings-as-errors=false + Treat warnings received from the server as errors and exit with a non-zero exit code +``` + diff --git a/docs/_includes/reference/cli/werf_kubectl_config_get_clusters.short.md b/docs/_includes/reference/cli/werf_kubectl_config_get_clusters.short.md new file mode 100644 index 0000000000..b5ea41281c --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_config_get_clusters.short.md @@ -0,0 +1 @@ +display clusters defined in the kubeconfig \ No newline at end of file diff --git a/docs/_includes/reference/cli/werf_kubectl_config_get_contexts.md b/docs/_includes/reference/cli/werf_kubectl_config_get_contexts.md new file mode 100644 index 0000000000..1168a828ad --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_config_get_contexts.md @@ -0,0 +1,90 @@ +{% if include.header %} +{% assign header = include.header %} +{% else %} +{% assign header = "###" %} +{% endif %} +Display one or many contexts from the kubeconfig file. + +{{ header }} Syntax + +```shell +werf kubectl config get-contexts [(-o|--output=)name)] [options] +``` + +{{ header }} Examples + +```shell + # List all the contexts in your kubeconfig file + kubectl config get-contexts + + # Describe one context in your kubeconfig file + kubectl config get-contexts my-context +``` + +{{ header }} Options + +```shell + --no-headers=false + When using the default or custom-column output format, don`t print headers (default + print headers). + -o, --output='' + Output format. One of: name +``` + +{{ header }} Options inherited from parent commands + +```shell + --as='' + Username to impersonate for the operation. User could be a regular user or a service + account in a namespace. + --as-group=[] + Group to impersonate for the operation, this flag can be repeated to specify multiple + groups. + --as-uid='' + UID to impersonate for the operation. + --cache-dir='~/.kube/cache' + Default cache directory + --certificate-authority='' + Path to a cert file for the certificate authority + --client-certificate='' + Path to a client certificate file for TLS + --client-key='' + Path to a client key file for TLS + --cluster='' + The name of the kubeconfig cluster to use + --context='' + The name of the kubeconfig context to use + --insecure-skip-tls-verify=false + If true, the server`s certificate will not be checked for validity. This will make your + HTTPS connections insecure + --kubeconfig='' + use a particular kubeconfig file + --match-server-version=false + Require server version to match client version + -n, --namespace='' + If present, the namespace scope for this CLI request + --password='' + Password for basic authentication to the API server + --profile='none' + Name of profile to capture. One of (none|cpu|heap|goroutine|threadcreate|block|mutex) + --profile-output='profile.pprof' + Name of the file to write the profile to + --request-timeout='0' + The length of time to wait before giving up on a single server request. Non-zero values + should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don`t + timeout requests. + -s, --server='' + The address and port of the Kubernetes API server + --tls-server-name='' + Server name to use for server certificate validation. If it is not provided, the + hostname used to contact the server is used + --token='' + Bearer token for authentication to the API server + --user='' + The name of the kubeconfig user to use + --username='' + Username for basic authentication to the API server + --warnings-as-errors=false + Treat warnings received from the server as errors and exit with a non-zero exit code +``` + diff --git a/docs/_includes/reference/cli/werf_kubectl_config_get_contexts.short.md b/docs/_includes/reference/cli/werf_kubectl_config_get_contexts.short.md new file mode 100644 index 0000000000..c7643bab00 --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_config_get_contexts.short.md @@ -0,0 +1 @@ +describe one or many contexts \ No newline at end of file diff --git a/docs/_includes/reference/cli/werf_kubectl_config_get_users.md b/docs/_includes/reference/cli/werf_kubectl_config_get_users.md new file mode 100644 index 0000000000..fa05e0bc7e --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_config_get_users.md @@ -0,0 +1,77 @@ +{% if include.header %} +{% assign header = include.header %} +{% else %} +{% assign header = "###" %} +{% endif %} +Display users defined in the kubeconfig. + +{{ header }} Syntax + +```shell +werf kubectl config get-users +``` + +{{ header }} Examples + +```shell + # List the users that kubectl knows about + kubectl config get-users +``` + +{{ header }} Options inherited from parent commands + +```shell + --as='' + Username to impersonate for the operation. User could be a regular user or a service + account in a namespace. + --as-group=[] + Group to impersonate for the operation, this flag can be repeated to specify multiple + groups. + --as-uid='' + UID to impersonate for the operation. + --cache-dir='~/.kube/cache' + Default cache directory + --certificate-authority='' + Path to a cert file for the certificate authority + --client-certificate='' + Path to a client certificate file for TLS + --client-key='' + Path to a client key file for TLS + --cluster='' + The name of the kubeconfig cluster to use + --context='' + The name of the kubeconfig context to use + --insecure-skip-tls-verify=false + If true, the server`s certificate will not be checked for validity. This will make your + HTTPS connections insecure + --kubeconfig='' + use a particular kubeconfig file + --match-server-version=false + Require server version to match client version + -n, --namespace='' + If present, the namespace scope for this CLI request + --password='' + Password for basic authentication to the API server + --profile='none' + Name of profile to capture. One of (none|cpu|heap|goroutine|threadcreate|block|mutex) + --profile-output='profile.pprof' + Name of the file to write the profile to + --request-timeout='0' + The length of time to wait before giving up on a single server request. Non-zero values + should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don`t + timeout requests. + -s, --server='' + The address and port of the Kubernetes API server + --tls-server-name='' + Server name to use for server certificate validation. If it is not provided, the + hostname used to contact the server is used + --token='' + Bearer token for authentication to the API server + --user='' + The name of the kubeconfig user to use + --username='' + Username for basic authentication to the API server + --warnings-as-errors=false + Treat warnings received from the server as errors and exit with a non-zero exit code +``` + diff --git a/docs/_includes/reference/cli/werf_kubectl_config_get_users.short.md b/docs/_includes/reference/cli/werf_kubectl_config_get_users.short.md new file mode 100644 index 0000000000..aec69d4b1f --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_config_get_users.short.md @@ -0,0 +1 @@ +display users defined in the kubeconfig \ No newline at end of file diff --git a/docs/_includes/reference/cli/werf_kubectl_config_rename_context.md b/docs/_includes/reference/cli/werf_kubectl_config_rename_context.md new file mode 100644 index 0000000000..d633ea1446 --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_config_rename_context.md @@ -0,0 +1,83 @@ +{% if include.header %} +{% assign header = include.header %} +{% else %} +{% assign header = "###" %} +{% endif %} +Renames a context from the kubeconfig file. + + CONTEXT_NAME is the context name that you want to change. + + NEW_NAME is the new name you want to set. + + Note: If the context being renamed is the 'current-context', this field will also be updated. + +{{ header }} Syntax + +```shell +werf kubectl config rename-context CONTEXT_NAME NEW_NAME +``` + +{{ header }} Examples + +```shell + # Rename the context 'old-name' to 'new-name' in your kubeconfig file + kubectl config rename-context old-name new-name +``` + +{{ header }} Options inherited from parent commands + +```shell + --as='' + Username to impersonate for the operation. User could be a regular user or a service + account in a namespace. + --as-group=[] + Group to impersonate for the operation, this flag can be repeated to specify multiple + groups. + --as-uid='' + UID to impersonate for the operation. + --cache-dir='~/.kube/cache' + Default cache directory + --certificate-authority='' + Path to a cert file for the certificate authority + --client-certificate='' + Path to a client certificate file for TLS + --client-key='' + Path to a client key file for TLS + --cluster='' + The name of the kubeconfig cluster to use + --context='' + The name of the kubeconfig context to use + --insecure-skip-tls-verify=false + If true, the server`s certificate will not be checked for validity. This will make your + HTTPS connections insecure + --kubeconfig='' + use a particular kubeconfig file + --match-server-version=false + Require server version to match client version + -n, --namespace='' + If present, the namespace scope for this CLI request + --password='' + Password for basic authentication to the API server + --profile='none' + Name of profile to capture. One of (none|cpu|heap|goroutine|threadcreate|block|mutex) + --profile-output='profile.pprof' + Name of the file to write the profile to + --request-timeout='0' + The length of time to wait before giving up on a single server request. Non-zero values + should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don`t + timeout requests. + -s, --server='' + The address and port of the Kubernetes API server + --tls-server-name='' + Server name to use for server certificate validation. If it is not provided, the + hostname used to contact the server is used + --token='' + Bearer token for authentication to the API server + --user='' + The name of the kubeconfig user to use + --username='' + Username for basic authentication to the API server + --warnings-as-errors=false + Treat warnings received from the server as errors and exit with a non-zero exit code +``` + diff --git a/docs/_includes/reference/cli/werf_kubectl_config_rename_context.short.md b/docs/_includes/reference/cli/werf_kubectl_config_rename_context.short.md new file mode 100644 index 0000000000..f29f39a62a --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_config_rename_context.short.md @@ -0,0 +1 @@ +rename a context from the kubeconfig file \ No newline at end of file diff --git a/docs/_includes/reference/cli/werf_kubectl_config_set.md b/docs/_includes/reference/cli/werf_kubectl_config_set.md new file mode 100644 index 0000000000..8ef19bb61c --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_config_set.md @@ -0,0 +1,100 @@ +{% if include.header %} +{% assign header = include.header %} +{% else %} +{% assign header = "###" %} +{% endif %} +Set an individual value in a kubeconfig file. + + PROPERTY_NAME is a dot delimited name where each token represents either an attribute name or a map key. Map keys may not contain dots. + + PROPERTY_VALUE is the new value you want to set. Binary fields such as 'certificate-authority-data' expect a base64 encoded string unless the --set-raw-bytes flag is used. + + Specifying an attribute name that already exists will merge new fields on top of existing values. + +{{ header }} Syntax + +```shell +werf kubectl config set PROPERTY_NAME PROPERTY_VALUE [options] +``` + +{{ header }} Examples + +```shell + # Set the server field on the my-cluster cluster to https://1.2.3.4 + kubectl config set clusters.my-cluster.server https://1.2.3.4 + + # Set the certificate-authority-data field on the my-cluster cluster + kubectl config set clusters.my-cluster.certificate-authority-data $(echo "cert_data_here" | base64 -i -) + + # Set the cluster field in the my-context context to my-cluster + kubectl config set contexts.my-context.cluster my-cluster + + # Set the client-key-data field in the cluster-admin user using --set-raw-bytes option + kubectl config set users.cluster-admin.client-key-data cert_data_here --set-raw-bytes=true +``` + +{{ header }} Options + +```shell + --set-raw-bytes=false + When writing a []byte PROPERTY_VALUE, write the given string directly without base64 + decoding. +``` + +{{ header }} Options inherited from parent commands + +```shell + --as='' + Username to impersonate for the operation. User could be a regular user or a service + account in a namespace. + --as-group=[] + Group to impersonate for the operation, this flag can be repeated to specify multiple + groups. + --as-uid='' + UID to impersonate for the operation. + --cache-dir='~/.kube/cache' + Default cache directory + --certificate-authority='' + Path to a cert file for the certificate authority + --client-certificate='' + Path to a client certificate file for TLS + --client-key='' + Path to a client key file for TLS + --cluster='' + The name of the kubeconfig cluster to use + --context='' + The name of the kubeconfig context to use + --insecure-skip-tls-verify=false + If true, the server`s certificate will not be checked for validity. This will make your + HTTPS connections insecure + --kubeconfig='' + use a particular kubeconfig file + --match-server-version=false + Require server version to match client version + -n, --namespace='' + If present, the namespace scope for this CLI request + --password='' + Password for basic authentication to the API server + --profile='none' + Name of profile to capture. One of (none|cpu|heap|goroutine|threadcreate|block|mutex) + --profile-output='profile.pprof' + Name of the file to write the profile to + --request-timeout='0' + The length of time to wait before giving up on a single server request. Non-zero values + should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don`t + timeout requests. + -s, --server='' + The address and port of the Kubernetes API server + --tls-server-name='' + Server name to use for server certificate validation. If it is not provided, the + hostname used to contact the server is used + --token='' + Bearer token for authentication to the API server + --user='' + The name of the kubeconfig user to use + --username='' + Username for basic authentication to the API server + --warnings-as-errors=false + Treat warnings received from the server as errors and exit with a non-zero exit code +``` + diff --git a/docs/_includes/reference/cli/werf_kubectl_config_set.short.md b/docs/_includes/reference/cli/werf_kubectl_config_set.short.md new file mode 100644 index 0000000000..2c45d13486 --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_config_set.short.md @@ -0,0 +1 @@ +set an individual value in a kubeconfig file \ No newline at end of file diff --git a/docs/_includes/reference/cli/werf_kubectl_config_set_cluster.md b/docs/_includes/reference/cli/werf_kubectl_config_set_cluster.md new file mode 100644 index 0000000000..7ad97ab36c --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_config_set_cluster.md @@ -0,0 +1,95 @@ +{% if include.header %} +{% assign header = include.header %} +{% else %} +{% assign header = "###" %} +{% endif %} +Set a cluster entry in kubeconfig. + + Specifying a name that already exists will merge new fields on top of existing values for those fields. + +{{ header }} Syntax + +```shell +werf kubectl config set-cluster NAME [--server=server] [--certificate-authority=path/to/certificate/authority] [--insecure-skip-tls-verify=true] [--tls-server-name=example.com] [options] +``` + +{{ header }} Examples + +```shell + # Set only the server field on the e2e cluster entry without touching other values + kubectl config set-cluster e2e --server=https://1.2.3.4 + + # Embed certificate authority data for the e2e cluster entry + kubectl config set-cluster e2e --embed-certs --certificate-authority=~/.kube/e2e/kubernetes.ca.crt + + # Disable cert checking for the dev cluster entry + kubectl config set-cluster e2e --insecure-skip-tls-verify=true + + # Set custom TLS server name to use for validation for the e2e cluster entry + kubectl config set-cluster e2e --tls-server-name=my-cluster-name +``` + +{{ header }} Options + +```shell + --embed-certs=false + embed-certs for the cluster entry in kubeconfig +``` + +{{ header }} Options inherited from parent commands + +```shell + --as='' + Username to impersonate for the operation. User could be a regular user or a service + account in a namespace. + --as-group=[] + Group to impersonate for the operation, this flag can be repeated to specify multiple + groups. + --as-uid='' + UID to impersonate for the operation. + --cache-dir='~/.kube/cache' + Default cache directory + --certificate-authority='' + Path to a cert file for the certificate authority + --client-certificate='' + Path to a client certificate file for TLS + --client-key='' + Path to a client key file for TLS + --cluster='' + The name of the kubeconfig cluster to use + --context='' + The name of the kubeconfig context to use + --insecure-skip-tls-verify=false + If true, the server`s certificate will not be checked for validity. This will make your + HTTPS connections insecure + --kubeconfig='' + use a particular kubeconfig file + --match-server-version=false + Require server version to match client version + -n, --namespace='' + If present, the namespace scope for this CLI request + --password='' + Password for basic authentication to the API server + --profile='none' + Name of profile to capture. One of (none|cpu|heap|goroutine|threadcreate|block|mutex) + --profile-output='profile.pprof' + Name of the file to write the profile to + --request-timeout='0' + The length of time to wait before giving up on a single server request. Non-zero values + should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don`t + timeout requests. + -s, --server='' + The address and port of the Kubernetes API server + --tls-server-name='' + Server name to use for server certificate validation. If it is not provided, the + hostname used to contact the server is used + --token='' + Bearer token for authentication to the API server + --user='' + The name of the kubeconfig user to use + --username='' + Username for basic authentication to the API server + --warnings-as-errors=false + Treat warnings received from the server as errors and exit with a non-zero exit code +``` + diff --git a/docs/_includes/reference/cli/werf_kubectl_config_set_cluster.short.md b/docs/_includes/reference/cli/werf_kubectl_config_set_cluster.short.md new file mode 100644 index 0000000000..2836fb4357 --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_config_set_cluster.short.md @@ -0,0 +1 @@ +set a cluster entry in kubeconfig \ No newline at end of file diff --git a/docs/_includes/reference/cli/werf_kubectl_config_set_context.md b/docs/_includes/reference/cli/werf_kubectl_config_set_context.md new file mode 100644 index 0000000000..c1cc57e103 --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_config_set_context.md @@ -0,0 +1,86 @@ +{% if include.header %} +{% assign header = include.header %} +{% else %} +{% assign header = "###" %} +{% endif %} +Set a context entry in kubeconfig. + + Specifying a name that already exists will merge new fields on top of existing values for those fields. + +{{ header }} Syntax + +```shell +werf kubectl config set-context [NAME | --current] [--cluster=cluster_nickname] [--user=user_nickname] [--namespace=namespace] [options] +``` + +{{ header }} Examples + +```shell + # Set the user field on the gce context entry without touching other values + kubectl config set-context gce --user=cluster-admin +``` + +{{ header }} Options + +```shell + --current=false + Modify the current context +``` + +{{ header }} Options inherited from parent commands + +```shell + --as='' + Username to impersonate for the operation. User could be a regular user or a service + account in a namespace. + --as-group=[] + Group to impersonate for the operation, this flag can be repeated to specify multiple + groups. + --as-uid='' + UID to impersonate for the operation. + --cache-dir='~/.kube/cache' + Default cache directory + --certificate-authority='' + Path to a cert file for the certificate authority + --client-certificate='' + Path to a client certificate file for TLS + --client-key='' + Path to a client key file for TLS + --cluster='' + The name of the kubeconfig cluster to use + --context='' + The name of the kubeconfig context to use + --insecure-skip-tls-verify=false + If true, the server`s certificate will not be checked for validity. This will make your + HTTPS connections insecure + --kubeconfig='' + use a particular kubeconfig file + --match-server-version=false + Require server version to match client version + -n, --namespace='' + If present, the namespace scope for this CLI request + --password='' + Password for basic authentication to the API server + --profile='none' + Name of profile to capture. One of (none|cpu|heap|goroutine|threadcreate|block|mutex) + --profile-output='profile.pprof' + Name of the file to write the profile to + --request-timeout='0' + The length of time to wait before giving up on a single server request. Non-zero values + should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don`t + timeout requests. + -s, --server='' + The address and port of the Kubernetes API server + --tls-server-name='' + Server name to use for server certificate validation. If it is not provided, the + hostname used to contact the server is used + --token='' + Bearer token for authentication to the API server + --user='' + The name of the kubeconfig user to use + --username='' + Username for basic authentication to the API server + --warnings-as-errors=false + Treat warnings received from the server as errors and exit with a non-zero exit code +``` + diff --git a/docs/_includes/reference/cli/werf_kubectl_config_set_context.short.md b/docs/_includes/reference/cli/werf_kubectl_config_set_context.short.md new file mode 100644 index 0000000000..4784677ce9 --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_config_set_context.short.md @@ -0,0 +1 @@ +set a context entry in kubeconfig \ No newline at end of file diff --git a/docs/_includes/reference/cli/werf_kubectl_config_set_credentials.md b/docs/_includes/reference/cli/werf_kubectl_config_set_credentials.md new file mode 100644 index 0000000000..77a456dd4a --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_config_set_credentials.md @@ -0,0 +1,137 @@ +{% if include.header %} +{% assign header = include.header %} +{% else %} +{% assign header = "###" %} +{% endif %} +Set a user entry in kubeconfig. + + Specifying a name that already exists will merge new fields on top of existing values. + + Client-certificate flags: + --client-certificate=certfile --client-key=keyfile + + Bearer token flags: + --token=bearer_token + + Basic auth flags: + --username=basic_user --password=basic_password + + Bearer token and basic auth are mutually exclusive. + +{{ header }} Syntax + +```shell +werf kubectl config set-credentials NAME [--client-certificate=path/to/certfile] [--client-key=path/to/keyfile] [--token=bearer_token] [--username=basic_user] [--password=basic_password] [--auth-provider=provider_name] [--auth-provider-arg=key=value] [--exec-command=exec_command] [--exec-api-version=exec_api_version] [--exec-arg=arg] [--exec-env=key=value] [options] +``` + +{{ header }} Examples + +```shell + # Set only the "client-key" field on the "cluster-admin" + # entry, without touching other values + kubectl config set-credentials cluster-admin --client-key=~/.kube/admin.key + + # Set basic auth for the "cluster-admin" entry + kubectl config set-credentials cluster-admin --username=admin --password=uXFGweU9l35qcif + + # Embed client certificate data in the "cluster-admin" entry + kubectl config set-credentials cluster-admin --client-certificate=~/.kube/admin.crt --embed-certs=true + + # Enable the Google Compute Platform auth provider for the "cluster-admin" entry + kubectl config set-credentials cluster-admin --auth-provider=gcp + + # Enable the OpenID Connect auth provider for the "cluster-admin" entry with additional args + kubectl config set-credentials cluster-admin --auth-provider=oidc --auth-provider-arg=client-id=foo --auth-provider-arg=client-secret=bar + + # Remove the "client-secret" config value for the OpenID Connect auth provider for the "cluster-admin" entry + kubectl config set-credentials cluster-admin --auth-provider=oidc --auth-provider-arg=client-secret- + + # Enable new exec auth plugin for the "cluster-admin" entry + kubectl config set-credentials cluster-admin --exec-command=/path/to/the/executable --exec-api-version=client.authentication.k8s.io/v1beta1 + + # Define new exec auth plugin args for the "cluster-admin" entry + kubectl config set-credentials cluster-admin --exec-arg=arg1 --exec-arg=arg2 + + # Create or update exec auth plugin environment variables for the "cluster-admin" entry + kubectl config set-credentials cluster-admin --exec-env=key1=val1 --exec-env=key2=val2 + + # Remove exec auth plugin environment variables for the "cluster-admin" entry + kubectl config set-credentials cluster-admin --exec-env=var-to-remove- +``` + +{{ header }} Options + +```shell + --auth-provider='' + Auth provider for the user entry in kubeconfig + --auth-provider-arg=[] + `key=value` arguments for the auth provider + --embed-certs=false + Embed client cert/key for the user entry in kubeconfig + --exec-api-version='' + API version of the exec credential plugin for the user entry in kubeconfig + --exec-arg=[] + New arguments for the exec credential plugin command for the user entry in kubeconfig + --exec-command='' + Command for the exec credential plugin for the user entry in kubeconfig + --exec-env=[] + `key=value` environment values for the exec credential plugin +``` + +{{ header }} Options inherited from parent commands + +```shell + --as='' + Username to impersonate for the operation. User could be a regular user or a service + account in a namespace. + --as-group=[] + Group to impersonate for the operation, this flag can be repeated to specify multiple + groups. + --as-uid='' + UID to impersonate for the operation. + --cache-dir='~/.kube/cache' + Default cache directory + --certificate-authority='' + Path to a cert file for the certificate authority + --client-certificate='' + Path to a client certificate file for TLS + --client-key='' + Path to a client key file for TLS + --cluster='' + The name of the kubeconfig cluster to use + --context='' + The name of the kubeconfig context to use + --insecure-skip-tls-verify=false + If true, the server`s certificate will not be checked for validity. This will make your + HTTPS connections insecure + --kubeconfig='' + use a particular kubeconfig file + --match-server-version=false + Require server version to match client version + -n, --namespace='' + If present, the namespace scope for this CLI request + --password='' + Password for basic authentication to the API server + --profile='none' + Name of profile to capture. One of (none|cpu|heap|goroutine|threadcreate|block|mutex) + --profile-output='profile.pprof' + Name of the file to write the profile to + --request-timeout='0' + The length of time to wait before giving up on a single server request. Non-zero values + should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don`t + timeout requests. + -s, --server='' + The address and port of the Kubernetes API server + --tls-server-name='' + Server name to use for server certificate validation. If it is not provided, the + hostname used to contact the server is used + --token='' + Bearer token for authentication to the API server + --user='' + The name of the kubeconfig user to use + --username='' + Username for basic authentication to the API server + --warnings-as-errors=false + Treat warnings received from the server as errors and exit with a non-zero exit code +``` + diff --git a/docs/_includes/reference/cli/werf_kubectl_config_set_credentials.short.md b/docs/_includes/reference/cli/werf_kubectl_config_set_credentials.short.md new file mode 100644 index 0000000000..240f7b4a35 --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_config_set_credentials.short.md @@ -0,0 +1 @@ +set a user entry in kubeconfig \ No newline at end of file diff --git a/docs/_includes/reference/cli/werf_kubectl_config_unset.md b/docs/_includes/reference/cli/werf_kubectl_config_unset.md new file mode 100644 index 0000000000..5a8d204f5e --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_config_unset.md @@ -0,0 +1,82 @@ +{% if include.header %} +{% assign header = include.header %} +{% else %} +{% assign header = "###" %} +{% endif %} +Unset an individual value in a kubeconfig file. + + PROPERTY_NAME is a dot delimited name where each token represents either an attribute name or a map key. Map keys may not contain dots. + +{{ header }} Syntax + +```shell +werf kubectl config unset PROPERTY_NAME +``` + +{{ header }} Examples + +```shell + # Unset the current-context + kubectl config unset current-context + + # Unset namespace in foo context + kubectl config unset contexts.foo.namespace +``` + +{{ header }} Options inherited from parent commands + +```shell + --as='' + Username to impersonate for the operation. User could be a regular user or a service + account in a namespace. + --as-group=[] + Group to impersonate for the operation, this flag can be repeated to specify multiple + groups. + --as-uid='' + UID to impersonate for the operation. + --cache-dir='~/.kube/cache' + Default cache directory + --certificate-authority='' + Path to a cert file for the certificate authority + --client-certificate='' + Path to a client certificate file for TLS + --client-key='' + Path to a client key file for TLS + --cluster='' + The name of the kubeconfig cluster to use + --context='' + The name of the kubeconfig context to use + --insecure-skip-tls-verify=false + If true, the server`s certificate will not be checked for validity. This will make your + HTTPS connections insecure + --kubeconfig='' + use a particular kubeconfig file + --match-server-version=false + Require server version to match client version + -n, --namespace='' + If present, the namespace scope for this CLI request + --password='' + Password for basic authentication to the API server + --profile='none' + Name of profile to capture. One of (none|cpu|heap|goroutine|threadcreate|block|mutex) + --profile-output='profile.pprof' + Name of the file to write the profile to + --request-timeout='0' + The length of time to wait before giving up on a single server request. Non-zero values + should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don`t + timeout requests. + -s, --server='' + The address and port of the Kubernetes API server + --tls-server-name='' + Server name to use for server certificate validation. If it is not provided, the + hostname used to contact the server is used + --token='' + Bearer token for authentication to the API server + --user='' + The name of the kubeconfig user to use + --username='' + Username for basic authentication to the API server + --warnings-as-errors=false + Treat warnings received from the server as errors and exit with a non-zero exit code +``` + diff --git a/docs/_includes/reference/cli/werf_kubectl_config_unset.short.md b/docs/_includes/reference/cli/werf_kubectl_config_unset.short.md new file mode 100644 index 0000000000..fb6a17b2ae --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_config_unset.short.md @@ -0,0 +1 @@ +unset an individual value in a kubeconfig file \ No newline at end of file diff --git a/docs/_includes/reference/cli/werf_kubectl_config_use_context.md b/docs/_includes/reference/cli/werf_kubectl_config_use_context.md new file mode 100644 index 0000000000..fc1be5722e --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_config_use_context.md @@ -0,0 +1,77 @@ +{% if include.header %} +{% assign header = include.header %} +{% else %} +{% assign header = "###" %} +{% endif %} +Set the current-context in a kubeconfig file. + +{{ header }} Syntax + +```shell +werf kubectl config use-context CONTEXT_NAME +``` + +{{ header }} Examples + +```shell + # Use the context for the minikube cluster + kubectl config use-context minikube +``` + +{{ header }} Options inherited from parent commands + +```shell + --as='' + Username to impersonate for the operation. User could be a regular user or a service + account in a namespace. + --as-group=[] + Group to impersonate for the operation, this flag can be repeated to specify multiple + groups. + --as-uid='' + UID to impersonate for the operation. + --cache-dir='~/.kube/cache' + Default cache directory + --certificate-authority='' + Path to a cert file for the certificate authority + --client-certificate='' + Path to a client certificate file for TLS + --client-key='' + Path to a client key file for TLS + --cluster='' + The name of the kubeconfig cluster to use + --context='' + The name of the kubeconfig context to use + --insecure-skip-tls-verify=false + If true, the server`s certificate will not be checked for validity. This will make your + HTTPS connections insecure + --kubeconfig='' + use a particular kubeconfig file + --match-server-version=false + Require server version to match client version + -n, --namespace='' + If present, the namespace scope for this CLI request + --password='' + Password for basic authentication to the API server + --profile='none' + Name of profile to capture. One of (none|cpu|heap|goroutine|threadcreate|block|mutex) + --profile-output='profile.pprof' + Name of the file to write the profile to + --request-timeout='0' + The length of time to wait before giving up on a single server request. Non-zero values + should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don`t + timeout requests. + -s, --server='' + The address and port of the Kubernetes API server + --tls-server-name='' + Server name to use for server certificate validation. If it is not provided, the + hostname used to contact the server is used + --token='' + Bearer token for authentication to the API server + --user='' + The name of the kubeconfig user to use + --username='' + Username for basic authentication to the API server + --warnings-as-errors=false + Treat warnings received from the server as errors and exit with a non-zero exit code +``` + diff --git a/docs/_includes/reference/cli/werf_kubectl_config_use_context.short.md b/docs/_includes/reference/cli/werf_kubectl_config_use_context.short.md new file mode 100644 index 0000000000..97a37de880 --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_config_use_context.short.md @@ -0,0 +1 @@ +set the current-context in a kubeconfig file \ No newline at end of file diff --git a/docs/_includes/reference/cli/werf_kubectl_config_view.md b/docs/_includes/reference/cli/werf_kubectl_config_view.md new file mode 100644 index 0000000000..a76570d82b --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_config_view.md @@ -0,0 +1,111 @@ +{% if include.header %} +{% assign header = include.header %} +{% else %} +{% assign header = "###" %} +{% endif %} +Display merged kubeconfig settings or a specified kubeconfig file. + + You can use --output jsonpath={...} to extract specific values using a jsonpath expression. + +{{ header }} Syntax + +```shell +werf kubectl config view [flags] [options] +``` + +{{ header }} Examples + +```shell + # Show merged kubeconfig settings + kubectl config view + + # Show merged kubeconfig settings and raw certificate data + kubectl config view --raw + + # Get the password for the e2e user + kubectl config view -o jsonpath='{.users[?(@.name == "e2e")].user.password}' +``` + +{{ header }} Options + +```shell + --allow-missing-template-keys=true + If true, ignore any errors in templates when a field or map key is missing in the + template. Only applies to golang and jsonpath output formats. + --flatten=false + Flatten the resulting kubeconfig file into self-contained output (useful for creating + portable kubeconfig files) + --merge=true + Merge the full hierarchy of kubeconfig files + --minify=false + Remove all information not used by current-context from the output + -o, --output='yaml' + Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile + |jsonpath|jsonpath-as-json|jsonpath-file. + --raw=false + Display raw byte data + --show-managed-fields=false + If true, keep the managedFields when printing objects in JSON or YAML format. + --template='' + Template string or path to template file to use when -o=go-template, + -o=go-template-file. The template format is golang templates + [http://golang.org/pkg/text/template/#pkg-overview]. +``` + +{{ header }} Options inherited from parent commands + +```shell + --as='' + Username to impersonate for the operation. User could be a regular user or a service + account in a namespace. + --as-group=[] + Group to impersonate for the operation, this flag can be repeated to specify multiple + groups. + --as-uid='' + UID to impersonate for the operation. + --cache-dir='~/.kube/cache' + Default cache directory + --certificate-authority='' + Path to a cert file for the certificate authority + --client-certificate='' + Path to a client certificate file for TLS + --client-key='' + Path to a client key file for TLS + --cluster='' + The name of the kubeconfig cluster to use + --context='' + The name of the kubeconfig context to use + --insecure-skip-tls-verify=false + If true, the server`s certificate will not be checked for validity. This will make your + HTTPS connections insecure + --kubeconfig='' + use a particular kubeconfig file + --match-server-version=false + Require server version to match client version + -n, --namespace='' + If present, the namespace scope for this CLI request + --password='' + Password for basic authentication to the API server + --profile='none' + Name of profile to capture. One of (none|cpu|heap|goroutine|threadcreate|block|mutex) + --profile-output='profile.pprof' + Name of the file to write the profile to + --request-timeout='0' + The length of time to wait before giving up on a single server request. Non-zero values + should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don`t + timeout requests. + -s, --server='' + The address and port of the Kubernetes API server + --tls-server-name='' + Server name to use for server certificate validation. If it is not provided, the + hostname used to contact the server is used + --token='' + Bearer token for authentication to the API server + --user='' + The name of the kubeconfig user to use + --username='' + Username for basic authentication to the API server + --warnings-as-errors=false + Treat warnings received from the server as errors and exit with a non-zero exit code +``` + diff --git a/docs/_includes/reference/cli/werf_kubectl_config_view.short.md b/docs/_includes/reference/cli/werf_kubectl_config_view.short.md new file mode 100644 index 0000000000..3024668432 --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_config_view.short.md @@ -0,0 +1 @@ +display merged kubeconfig settings or a specified kubeconfig file \ No newline at end of file diff --git a/docs/_includes/reference/cli/werf_kubectl_cordon.md b/docs/_includes/reference/cli/werf_kubectl_cordon.md new file mode 100644 index 0000000000..8166a2afb9 --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_cordon.md @@ -0,0 +1,88 @@ +{% if include.header %} +{% assign header = include.header %} +{% else %} +{% assign header = "###" %} +{% endif %} +Mark node as unschedulable. + +{{ header }} Syntax + +```shell +werf kubectl cordon NODE [options] +``` + +{{ header }} Examples + +```shell + # Mark node "foo" as unschedulable + kubectl cordon foo +``` + +{{ header }} Options + +```shell + --dry-run='none' + Must be "none", "server", or "client". If client strategy, only print the object that + would be sent, without sending it. If server strategy, submit server-side request + without persisting the resource. + -l, --selector='' + Selector (label query) to filter on +``` + +{{ header }} Options inherited from parent commands + +```shell + --as='' + Username to impersonate for the operation. User could be a regular user or a service + account in a namespace. + --as-group=[] + Group to impersonate for the operation, this flag can be repeated to specify multiple + groups. + --as-uid='' + UID to impersonate for the operation. + --cache-dir='~/.kube/cache' + Default cache directory + --certificate-authority='' + Path to a cert file for the certificate authority + --client-certificate='' + Path to a client certificate file for TLS + --client-key='' + Path to a client key file for TLS + --cluster='' + The name of the kubeconfig cluster to use + --context='' + The name of the kubeconfig context to use + --insecure-skip-tls-verify=false + If true, the server`s certificate will not be checked for validity. This will make your + HTTPS connections insecure + --kubeconfig='' + Path to the kubeconfig file to use for CLI requests. + --match-server-version=false + Require server version to match client version + -n, --namespace='' + If present, the namespace scope for this CLI request + --password='' + Password for basic authentication to the API server + --profile='none' + Name of profile to capture. One of (none|cpu|heap|goroutine|threadcreate|block|mutex) + --profile-output='profile.pprof' + Name of the file to write the profile to + --request-timeout='0' + The length of time to wait before giving up on a single server request. Non-zero values + should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don`t + timeout requests. + -s, --server='' + The address and port of the Kubernetes API server + --tls-server-name='' + Server name to use for server certificate validation. If it is not provided, the + hostname used to contact the server is used + --token='' + Bearer token for authentication to the API server + --user='' + The name of the kubeconfig user to use + --username='' + Username for basic authentication to the API server + --warnings-as-errors=false + Treat warnings received from the server as errors and exit with a non-zero exit code +``` + diff --git a/docs/_includes/reference/cli/werf_kubectl_cordon.short.md b/docs/_includes/reference/cli/werf_kubectl_cordon.short.md new file mode 100644 index 0000000000..22261a6f9b --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_cordon.short.md @@ -0,0 +1 @@ +mark node as unschedulable \ No newline at end of file diff --git a/docs/_includes/reference/cli/werf_kubectl_cp.md b/docs/_includes/reference/cli/werf_kubectl_cp.md new file mode 100644 index 0000000000..93665a5a2c --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_cp.md @@ -0,0 +1,114 @@ +{% if include.header %} +{% assign header = include.header %} +{% else %} +{% assign header = "###" %} +{% endif %} +Copy files and directories to and from containers. + +{{ header }} Syntax + +```shell +werf kubectl cp [options] +``` + +{{ header }} Examples + +```shell + # !!!Important Note!!! + # Requires that the 'tar' binary is present in your container + # image. If 'tar' is not present, 'kubectl cp' will fail. + # + # For advanced use cases, such as symlinks, wildcard expansion or + # file mode preservation, consider using 'kubectl exec'. + + # Copy /tmp/foo local file to /tmp/bar in a remote pod in namespace + tar cf - /tmp/foo | kubectl exec -i -n -- tar xf - -C /tmp/bar + + # Copy /tmp/foo from a remote pod to /tmp/bar locally + kubectl exec -n -- tar cf - /tmp/foo | tar xf - -C /tmp/bar + + # Copy /tmp/foo_dir local directory to /tmp/bar_dir in a remote pod in the default namespace + kubectl cp /tmp/foo_dir :/tmp/bar_dir + + # Copy /tmp/foo local file to /tmp/bar in a remote pod in a specific container + kubectl cp /tmp/foo :/tmp/bar -c + + # Copy /tmp/foo local file to /tmp/bar in a remote pod in namespace + kubectl cp /tmp/foo /:/tmp/bar + + # Copy /tmp/foo from a remote pod to /tmp/bar locally + kubectl cp /:/tmp/foo /tmp/bar +``` + +{{ header }} Options + +```shell + -c, --container='' + Container name. If omitted, use the kubectl.kubernetes.io/default-container annotation + for selecting the container to be attached or the first container in the pod will be + chosen + --no-preserve=false + The copied file/directory`s ownership and permissions will not be preserved in the + container + --retries=0 + Set number of retries to complete a copy operation from a container. Specify 0 to + disable or any negative value for infinite retrying. The default is 0 (no retry). +``` + +{{ header }} Options inherited from parent commands + +```shell + --as='' + Username to impersonate for the operation. User could be a regular user or a service + account in a namespace. + --as-group=[] + Group to impersonate for the operation, this flag can be repeated to specify multiple + groups. + --as-uid='' + UID to impersonate for the operation. + --cache-dir='~/.kube/cache' + Default cache directory + --certificate-authority='' + Path to a cert file for the certificate authority + --client-certificate='' + Path to a client certificate file for TLS + --client-key='' + Path to a client key file for TLS + --cluster='' + The name of the kubeconfig cluster to use + --context='' + The name of the kubeconfig context to use + --insecure-skip-tls-verify=false + If true, the server`s certificate will not be checked for validity. This will make your + HTTPS connections insecure + --kubeconfig='' + Path to the kubeconfig file to use for CLI requests. + --match-server-version=false + Require server version to match client version + -n, --namespace='' + If present, the namespace scope for this CLI request + --password='' + Password for basic authentication to the API server + --profile='none' + Name of profile to capture. One of (none|cpu|heap|goroutine|threadcreate|block|mutex) + --profile-output='profile.pprof' + Name of the file to write the profile to + --request-timeout='0' + The length of time to wait before giving up on a single server request. Non-zero values + should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don`t + timeout requests. + -s, --server='' + The address and port of the Kubernetes API server + --tls-server-name='' + Server name to use for server certificate validation. If it is not provided, the + hostname used to contact the server is used + --token='' + Bearer token for authentication to the API server + --user='' + The name of the kubeconfig user to use + --username='' + Username for basic authentication to the API server + --warnings-as-errors=false + Treat warnings received from the server as errors and exit with a non-zero exit code +``` + diff --git a/docs/_includes/reference/cli/werf_kubectl_cp.short.md b/docs/_includes/reference/cli/werf_kubectl_cp.short.md new file mode 100644 index 0000000000..2e99f9cf95 --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_cp.short.md @@ -0,0 +1 @@ +copy files and directories to and from containers \ No newline at end of file diff --git a/docs/_includes/reference/cli/werf_kubectl_create.md b/docs/_includes/reference/cli/werf_kubectl_create.md new file mode 100644 index 0000000000..a4c4e1effa --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_create.md @@ -0,0 +1,130 @@ +{% if include.header %} +{% assign header = include.header %} +{% else %} +{% assign header = "###" %} +{% endif %} +Create a resource from a file or from stdin. + + JSON and YAML formats are accepted. + +{{ header }} Syntax + +```shell +werf kubectl create -f FILENAME [options] +``` + +{{ header }} Examples + +```shell + # Create a pod using the data in pod.json + kubectl create -f ./pod.json + + # Create a pod based on the JSON passed into stdin + cat pod.json | kubectl create -f - + + # Edit the data in docker-registry.yaml in JSON then create the resource using the edited data + kubectl create -f docker-registry.yaml --edit -o json +``` + +{{ header }} Options + +```shell + --allow-missing-template-keys=true + If true, ignore any errors in templates when a field or map key is missing in the + template. Only applies to golang and jsonpath output formats. + --dry-run='none' + Must be "none", "server", or "client". If client strategy, only print the object that + would be sent, without sending it. If server strategy, submit server-side request + without persisting the resource. + --edit=false + Edit the API resource before creating + --field-manager='kubectl-create' + Name of the manager used to track field ownership. + -f, --filename=[] + Filename, directory, or URL to files to use to create the resource + -k, --kustomize='' + Process the kustomization directory. This flag can`t be used together with -f or -R. + -o, --output='' + Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile + |jsonpath|jsonpath-as-json|jsonpath-file. + --raw='' + Raw URI to POST to the server. Uses the transport specified by the kubeconfig file. + -R, --recursive=false + Process the directory used in -f, --filename recursively. Useful when you want to + manage related manifests organized within the same directory. + --save-config=false + If true, the configuration of current object will be saved in its annotation. + Otherwise, the annotation will be unchanged. This flag is useful when you want to + perform kubectl apply on this object in the future. + -l, --selector='' + Selector (label query) to filter on, supports `=`, `==`, and `!=`.(e.g. -l + key1=value1,key2=value2) + --show-managed-fields=false + If true, keep the managedFields when printing objects in JSON or YAML format. + --template='' + Template string or path to template file to use when -o=go-template, + -o=go-template-file. The template format is golang templates + [http://golang.org/pkg/text/template/#pkg-overview]. + --validate=true + If true, use a schema to validate the input before sending it + --windows-line-endings=false + Only relevant if --edit=true. Defaults to the line ending native to your platform. +``` + +{{ header }} Options inherited from parent commands + +```shell + --as='' + Username to impersonate for the operation. User could be a regular user or a service + account in a namespace. + --as-group=[] + Group to impersonate for the operation, this flag can be repeated to specify multiple + groups. + --as-uid='' + UID to impersonate for the operation. + --cache-dir='~/.kube/cache' + Default cache directory + --certificate-authority='' + Path to a cert file for the certificate authority + --client-certificate='' + Path to a client certificate file for TLS + --client-key='' + Path to a client key file for TLS + --cluster='' + The name of the kubeconfig cluster to use + --context='' + The name of the kubeconfig context to use + --insecure-skip-tls-verify=false + If true, the server`s certificate will not be checked for validity. This will make your + HTTPS connections insecure + --kubeconfig='' + Path to the kubeconfig file to use for CLI requests. + --match-server-version=false + Require server version to match client version + -n, --namespace='' + If present, the namespace scope for this CLI request + --password='' + Password for basic authentication to the API server + --profile='none' + Name of profile to capture. One of (none|cpu|heap|goroutine|threadcreate|block|mutex) + --profile-output='profile.pprof' + Name of the file to write the profile to + --request-timeout='0' + The length of time to wait before giving up on a single server request. Non-zero values + should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don`t + timeout requests. + -s, --server='' + The address and port of the Kubernetes API server + --tls-server-name='' + Server name to use for server certificate validation. If it is not provided, the + hostname used to contact the server is used + --token='' + Bearer token for authentication to the API server + --user='' + The name of the kubeconfig user to use + --username='' + Username for basic authentication to the API server + --warnings-as-errors=false + Treat warnings received from the server as errors and exit with a non-zero exit code +``` + diff --git a/docs/_includes/reference/cli/werf_kubectl_create.short.md b/docs/_includes/reference/cli/werf_kubectl_create.short.md new file mode 100644 index 0000000000..4f52c4fc5c --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_create.short.md @@ -0,0 +1 @@ +create a resource from a file or from stdin \ No newline at end of file diff --git a/docs/_includes/reference/cli/werf_kubectl_create_clusterrole.md b/docs/_includes/reference/cli/werf_kubectl_create_clusterrole.md new file mode 100644 index 0000000000..a9422559bc --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_create_clusterrole.md @@ -0,0 +1,131 @@ +{% if include.header %} +{% assign header = include.header %} +{% else %} +{% assign header = "###" %} +{% endif %} +Create a cluster role. + +{{ header }} Syntax + +```shell +werf kubectl create clusterrole NAME --verb=verb --resource=resource.group [--resource-name=resourcename] [--dry-run=server|client|none] [options] +``` + +{{ header }} Examples + +```shell + # Create a cluster role named "pod-reader" that allows user to perform "get", "watch" and "list" on pods + kubectl create clusterrole pod-reader --verb=get,list,watch --resource=pods + + # Create a cluster role named "pod-reader" with ResourceName specified + kubectl create clusterrole pod-reader --verb=get --resource=pods --resource-name=readablepod --resource-name=anotherpod + + # Create a cluster role named "foo" with API Group specified + kubectl create clusterrole foo --verb=get,list,watch --resource=rs.extensions + + # Create a cluster role named "foo" with SubResource specified + kubectl create clusterrole foo --verb=get,list,watch --resource=pods,pods/status + + # Create a cluster role name "foo" with NonResourceURL specified + kubectl create clusterrole "foo" --verb=get --non-resource-url=/logs/* + + # Create a cluster role name "monitoring" with AggregationRule specified + kubectl create clusterrole monitoring --aggregation-rule="rbac.example.com/aggregate-to-monitoring=true" +``` + +{{ header }} Options + +```shell + --aggregation-rule= + An aggregation label selector for combining ClusterRoles. + --allow-missing-template-keys=true + If true, ignore any errors in templates when a field or map key is missing in the + template. Only applies to golang and jsonpath output formats. + --dry-run='none' + Must be "none", "server", or "client". If client strategy, only print the object that + would be sent, without sending it. If server strategy, submit server-side request + without persisting the resource. + --field-manager='kubectl-create' + Name of the manager used to track field ownership. + --non-resource-url=[] + A partial url that user should have access to. + -o, --output='' + Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile + |jsonpath|jsonpath-as-json|jsonpath-file. + --resource=[] + Resource that the rule applies to + --resource-name=[] + Resource in the white list that the rule applies to, repeat this flag for multiple items + --save-config=false + If true, the configuration of current object will be saved in its annotation. + Otherwise, the annotation will be unchanged. This flag is useful when you want to + perform kubectl apply on this object in the future. + --show-managed-fields=false + If true, keep the managedFields when printing objects in JSON or YAML format. + --template='' + Template string or path to template file to use when -o=go-template, + -o=go-template-file. The template format is golang templates + [http://golang.org/pkg/text/template/#pkg-overview]. + --validate=true + If true, use a schema to validate the input before sending it + --verb=[] + Verb that applies to the resources contained in the rule +``` + +{{ header }} Options inherited from parent commands + +```shell + --as='' + Username to impersonate for the operation. User could be a regular user or a service + account in a namespace. + --as-group=[] + Group to impersonate for the operation, this flag can be repeated to specify multiple + groups. + --as-uid='' + UID to impersonate for the operation. + --cache-dir='~/.kube/cache' + Default cache directory + --certificate-authority='' + Path to a cert file for the certificate authority + --client-certificate='' + Path to a client certificate file for TLS + --client-key='' + Path to a client key file for TLS + --cluster='' + The name of the kubeconfig cluster to use + --context='' + The name of the kubeconfig context to use + --insecure-skip-tls-verify=false + If true, the server`s certificate will not be checked for validity. This will make your + HTTPS connections insecure + --kubeconfig='' + Path to the kubeconfig file to use for CLI requests. + --match-server-version=false + Require server version to match client version + -n, --namespace='' + If present, the namespace scope for this CLI request + --password='' + Password for basic authentication to the API server + --profile='none' + Name of profile to capture. One of (none|cpu|heap|goroutine|threadcreate|block|mutex) + --profile-output='profile.pprof' + Name of the file to write the profile to + --request-timeout='0' + The length of time to wait before giving up on a single server request. Non-zero values + should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don`t + timeout requests. + -s, --server='' + The address and port of the Kubernetes API server + --tls-server-name='' + Server name to use for server certificate validation. If it is not provided, the + hostname used to contact the server is used + --token='' + Bearer token for authentication to the API server + --user='' + The name of the kubeconfig user to use + --username='' + Username for basic authentication to the API server + --warnings-as-errors=false + Treat warnings received from the server as errors and exit with a non-zero exit code +``` + diff --git a/docs/_includes/reference/cli/werf_kubectl_create_clusterrole.short.md b/docs/_includes/reference/cli/werf_kubectl_create_clusterrole.short.md new file mode 100644 index 0000000000..c113b61161 --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_create_clusterrole.short.md @@ -0,0 +1 @@ +create a cluster role \ No newline at end of file diff --git a/docs/_includes/reference/cli/werf_kubectl_create_clusterrolebinding.md b/docs/_includes/reference/cli/werf_kubectl_create_clusterrolebinding.md new file mode 100644 index 0000000000..dd12dd8777 --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_create_clusterrolebinding.md @@ -0,0 +1,112 @@ +{% if include.header %} +{% assign header = include.header %} +{% else %} +{% assign header = "###" %} +{% endif %} +Create a cluster role binding for a particular cluster role. + +{{ header }} Syntax + +```shell +werf kubectl create clusterrolebinding NAME --clusterrole=NAME [--user=username] [--group=groupname] [--serviceaccount=namespace:serviceaccountname] [--dry-run=server|client|none] [options] +``` + +{{ header }} Examples + +```shell + # Create a cluster role binding for user1, user2, and group1 using the cluster-admin cluster role + kubectl create clusterrolebinding cluster-admin --clusterrole=cluster-admin --user=user1 --user=user2 --group=group1 +``` + +{{ header }} Options + +```shell + --allow-missing-template-keys=true + If true, ignore any errors in templates when a field or map key is missing in the + template. Only applies to golang and jsonpath output formats. + --clusterrole='' + ClusterRole this ClusterRoleBinding should reference + --dry-run='none' + Must be "none", "server", or "client". If client strategy, only print the object that + would be sent, without sending it. If server strategy, submit server-side request + without persisting the resource. + --field-manager='kubectl-create' + Name of the manager used to track field ownership. + --group=[] + Groups to bind to the clusterrole + -o, --output='' + Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile + |jsonpath|jsonpath-as-json|jsonpath-file. + --save-config=false + If true, the configuration of current object will be saved in its annotation. + Otherwise, the annotation will be unchanged. This flag is useful when you want to + perform kubectl apply on this object in the future. + --serviceaccount=[] + Service accounts to bind to the clusterrole, in the format : + --show-managed-fields=false + If true, keep the managedFields when printing objects in JSON or YAML format. + --template='' + Template string or path to template file to use when -o=go-template, + -o=go-template-file. The template format is golang templates + [http://golang.org/pkg/text/template/#pkg-overview]. + --validate=true + If true, use a schema to validate the input before sending it +``` + +{{ header }} Options inherited from parent commands + +```shell + --as='' + Username to impersonate for the operation. User could be a regular user or a service + account in a namespace. + --as-group=[] + Group to impersonate for the operation, this flag can be repeated to specify multiple + groups. + --as-uid='' + UID to impersonate for the operation. + --cache-dir='~/.kube/cache' + Default cache directory + --certificate-authority='' + Path to a cert file for the certificate authority + --client-certificate='' + Path to a client certificate file for TLS + --client-key='' + Path to a client key file for TLS + --cluster='' + The name of the kubeconfig cluster to use + --context='' + The name of the kubeconfig context to use + --insecure-skip-tls-verify=false + If true, the server`s certificate will not be checked for validity. This will make your + HTTPS connections insecure + --kubeconfig='' + Path to the kubeconfig file to use for CLI requests. + --match-server-version=false + Require server version to match client version + -n, --namespace='' + If present, the namespace scope for this CLI request + --password='' + Password for basic authentication to the API server + --profile='none' + Name of profile to capture. One of (none|cpu|heap|goroutine|threadcreate|block|mutex) + --profile-output='profile.pprof' + Name of the file to write the profile to + --request-timeout='0' + The length of time to wait before giving up on a single server request. Non-zero values + should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don`t + timeout requests. + -s, --server='' + The address and port of the Kubernetes API server + --tls-server-name='' + Server name to use for server certificate validation. If it is not provided, the + hostname used to contact the server is used + --token='' + Bearer token for authentication to the API server + --user='' + The name of the kubeconfig user to use + --username='' + Username for basic authentication to the API server + --warnings-as-errors=false + Treat warnings received from the server as errors and exit with a non-zero exit code +``` + diff --git a/docs/_includes/reference/cli/werf_kubectl_create_clusterrolebinding.short.md b/docs/_includes/reference/cli/werf_kubectl_create_clusterrolebinding.short.md new file mode 100644 index 0000000000..fc2b6f70f3 --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_create_clusterrolebinding.short.md @@ -0,0 +1 @@ +create a cluster role binding for a particular cluster role \ No newline at end of file diff --git a/docs/_includes/reference/cli/werf_kubectl_create_configmap.md b/docs/_includes/reference/cli/werf_kubectl_create_configmap.md new file mode 100644 index 0000000000..f092fbd531 --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_create_configmap.md @@ -0,0 +1,136 @@ +{% if include.header %} +{% assign header = include.header %} +{% else %} +{% assign header = "###" %} +{% endif %} +Create a config map based on a file, directory, or specified literal value. + + A single config map may package one or more key/value pairs. + + When creating a config map based on a file, the key will default to the basename of the file, and the value will default to the file content. If the basename is an invalid key, you may specify an alternate key. + + When creating a config map based on a directory, each file whose basename is a valid key in the directory will be packaged into the config map. Any directory entries except regular files are ignored (e.g. subdirectories, symlinks, devices, pipes, etc). + +{{ header }} Syntax + +```shell +werf kubectl create configmap NAME [--from-file=[key=]source] [--from-literal=key1=value1] [--dry-run=server|client|none] [options] +``` + +{{ header }} Examples + +```shell + # Create a new config map named my-config based on folder bar + kubectl create configmap my-config --from-file=path/to/bar + + # Create a new config map named my-config with specified keys instead of file basenames on disk + kubectl create configmap my-config --from-file=key1=/path/to/bar/file1.txt --from-file=key2=/path/to/bar/file2.txt + + # Create a new config map named my-config with key1=config1 and key2=config2 + kubectl create configmap my-config --from-literal=key1=config1 --from-literal=key2=config2 + + # Create a new config map named my-config from the key=value pairs in the file + kubectl create configmap my-config --from-file=path/to/bar + + # Create a new config map named my-config from an env file + kubectl create configmap my-config --from-env-file=path/to/foo.env --from-env-file=path/to/bar.env +``` + +{{ header }} Options + +```shell + --allow-missing-template-keys=true + If true, ignore any errors in templates when a field or map key is missing in the + template. Only applies to golang and jsonpath output formats. + --append-hash=false + Append a hash of the configmap to its name. + --dry-run='none' + Must be "none", "server", or "client". If client strategy, only print the object that + would be sent, without sending it. If server strategy, submit server-side request + without persisting the resource. + --field-manager='kubectl-create' + Name of the manager used to track field ownership. + --from-env-file=[] + Specify the path to a file to read lines of key=val pairs to create a configmap (i.e. a + Docker .env file). + --from-file=[] + Key file can be specified using its file path, in which case file basename will be used + as configmap key, or optionally with a key and file path, in which case the given key + will be used. Specifying a directory will iterate each named file in the directory + whose basename is a valid configmap key. + --from-literal=[] + Specify a key and literal value to insert in configmap (i.e. mykey=somevalue) + -o, --output='' + Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile + |jsonpath|jsonpath-as-json|jsonpath-file. + --save-config=false + If true, the configuration of current object will be saved in its annotation. + Otherwise, the annotation will be unchanged. This flag is useful when you want to + perform kubectl apply on this object in the future. + --show-managed-fields=false + If true, keep the managedFields when printing objects in JSON or YAML format. + --template='' + Template string or path to template file to use when -o=go-template, + -o=go-template-file. The template format is golang templates + [http://golang.org/pkg/text/template/#pkg-overview]. + --validate=true + If true, use a schema to validate the input before sending it +``` + +{{ header }} Options inherited from parent commands + +```shell + --as='' + Username to impersonate for the operation. User could be a regular user or a service + account in a namespace. + --as-group=[] + Group to impersonate for the operation, this flag can be repeated to specify multiple + groups. + --as-uid='' + UID to impersonate for the operation. + --cache-dir='~/.kube/cache' + Default cache directory + --certificate-authority='' + Path to a cert file for the certificate authority + --client-certificate='' + Path to a client certificate file for TLS + --client-key='' + Path to a client key file for TLS + --cluster='' + The name of the kubeconfig cluster to use + --context='' + The name of the kubeconfig context to use + --insecure-skip-tls-verify=false + If true, the server`s certificate will not be checked for validity. This will make your + HTTPS connections insecure + --kubeconfig='' + Path to the kubeconfig file to use for CLI requests. + --match-server-version=false + Require server version to match client version + -n, --namespace='' + If present, the namespace scope for this CLI request + --password='' + Password for basic authentication to the API server + --profile='none' + Name of profile to capture. One of (none|cpu|heap|goroutine|threadcreate|block|mutex) + --profile-output='profile.pprof' + Name of the file to write the profile to + --request-timeout='0' + The length of time to wait before giving up on a single server request. Non-zero values + should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don`t + timeout requests. + -s, --server='' + The address and port of the Kubernetes API server + --tls-server-name='' + Server name to use for server certificate validation. If it is not provided, the + hostname used to contact the server is used + --token='' + Bearer token for authentication to the API server + --user='' + The name of the kubeconfig user to use + --username='' + Username for basic authentication to the API server + --warnings-as-errors=false + Treat warnings received from the server as errors and exit with a non-zero exit code +``` + diff --git a/docs/_includes/reference/cli/werf_kubectl_create_configmap.short.md b/docs/_includes/reference/cli/werf_kubectl_create_configmap.short.md new file mode 100644 index 0000000000..d5b9fa5012 --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_create_configmap.short.md @@ -0,0 +1 @@ +create a config map from a local file, directory or literal value \ No newline at end of file diff --git a/docs/_includes/reference/cli/werf_kubectl_create_cronjob.md b/docs/_includes/reference/cli/werf_kubectl_create_cronjob.md new file mode 100644 index 0000000000..a9989ff7c6 --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_create_cronjob.md @@ -0,0 +1,115 @@ +{% if include.header %} +{% assign header = include.header %} +{% else %} +{% assign header = "###" %} +{% endif %} +Create a cron job with the specified name. + +{{ header }} Syntax + +```shell +werf kubectl create cronjob NAME --image=image --schedule='0/5 * * * ?' -- [COMMAND] [args...] [flags] [options] +``` + +{{ header }} Examples + +```shell + # Create a cron job + kubectl create cronjob my-job --image=busybox --schedule="*/1 * * * *" + + # Create a cron job with a command + kubectl create cronjob my-job --image=busybox --schedule="*/1 * * * *" -- date +``` + +{{ header }} Options + +```shell + --allow-missing-template-keys=true + If true, ignore any errors in templates when a field or map key is missing in the + template. Only applies to golang and jsonpath output formats. + --dry-run='none' + Must be "none", "server", or "client". If client strategy, only print the object that + would be sent, without sending it. If server strategy, submit server-side request + without persisting the resource. + --field-manager='kubectl-create' + Name of the manager used to track field ownership. + --image='' + Image name to run. + -o, --output='' + Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile + |jsonpath|jsonpath-as-json|jsonpath-file. + --restart='' + job`s restart policy. supported values: OnFailure, Never + --save-config=false + If true, the configuration of current object will be saved in its annotation. + Otherwise, the annotation will be unchanged. This flag is useful when you want to + perform kubectl apply on this object in the future. + --schedule='' + A schedule in the Cron format the job should be run with. + --show-managed-fields=false + If true, keep the managedFields when printing objects in JSON or YAML format. + --template='' + Template string or path to template file to use when -o=go-template, + -o=go-template-file. The template format is golang templates + [http://golang.org/pkg/text/template/#pkg-overview]. + --validate=true + If true, use a schema to validate the input before sending it +``` + +{{ header }} Options inherited from parent commands + +```shell + --as='' + Username to impersonate for the operation. User could be a regular user or a service + account in a namespace. + --as-group=[] + Group to impersonate for the operation, this flag can be repeated to specify multiple + groups. + --as-uid='' + UID to impersonate for the operation. + --cache-dir='~/.kube/cache' + Default cache directory + --certificate-authority='' + Path to a cert file for the certificate authority + --client-certificate='' + Path to a client certificate file for TLS + --client-key='' + Path to a client key file for TLS + --cluster='' + The name of the kubeconfig cluster to use + --context='' + The name of the kubeconfig context to use + --insecure-skip-tls-verify=false + If true, the server`s certificate will not be checked for validity. This will make your + HTTPS connections insecure + --kubeconfig='' + Path to the kubeconfig file to use for CLI requests. + --match-server-version=false + Require server version to match client version + -n, --namespace='' + If present, the namespace scope for this CLI request + --password='' + Password for basic authentication to the API server + --profile='none' + Name of profile to capture. One of (none|cpu|heap|goroutine|threadcreate|block|mutex) + --profile-output='profile.pprof' + Name of the file to write the profile to + --request-timeout='0' + The length of time to wait before giving up on a single server request. Non-zero values + should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don`t + timeout requests. + -s, --server='' + The address and port of the Kubernetes API server + --tls-server-name='' + Server name to use for server certificate validation. If it is not provided, the + hostname used to contact the server is used + --token='' + Bearer token for authentication to the API server + --user='' + The name of the kubeconfig user to use + --username='' + Username for basic authentication to the API server + --warnings-as-errors=false + Treat warnings received from the server as errors and exit with a non-zero exit code +``` + diff --git a/docs/_includes/reference/cli/werf_kubectl_create_cronjob.short.md b/docs/_includes/reference/cli/werf_kubectl_create_cronjob.short.md new file mode 100644 index 0000000000..c44ccff06b --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_create_cronjob.short.md @@ -0,0 +1 @@ +create a cron job with the specified name \ No newline at end of file diff --git a/docs/_includes/reference/cli/werf_kubectl_create_deployment.md b/docs/_includes/reference/cli/werf_kubectl_create_deployment.md new file mode 100644 index 0000000000..eee07b9d84 --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_create_deployment.md @@ -0,0 +1,121 @@ +{% if include.header %} +{% assign header = include.header %} +{% else %} +{% assign header = "###" %} +{% endif %} +Create a deployment with the specified name. + +{{ header }} Syntax + +```shell +werf kubectl create deployment NAME --image=image -- [COMMAND] [args...] [options] +``` + +{{ header }} Examples + +```shell + # Create a deployment named my-dep that runs the busybox image + kubectl create deployment my-dep --image=busybox + + # Create a deployment with a command + kubectl create deployment my-dep --image=busybox -- date + + # Create a deployment named my-dep that runs the nginx image with 3 replicas + kubectl create deployment my-dep --image=nginx --replicas=3 + + # Create a deployment named my-dep that runs the busybox image and expose port 5701 + kubectl create deployment my-dep --image=busybox --port=5701 +``` + +{{ header }} Options + +```shell + --allow-missing-template-keys=true + If true, ignore any errors in templates when a field or map key is missing in the + template. Only applies to golang and jsonpath output formats. + --dry-run='none' + Must be "none", "server", or "client". If client strategy, only print the object that + would be sent, without sending it. If server strategy, submit server-side request + without persisting the resource. + --field-manager='kubectl-create' + Name of the manager used to track field ownership. + --image=[] + Image names to run. + -o, --output='' + Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile + |jsonpath|jsonpath-as-json|jsonpath-file. + --port=-1 + The port that this container exposes. + -r, --replicas=1 + Number of replicas to create. Default is 1. + --save-config=false + If true, the configuration of current object will be saved in its annotation. + Otherwise, the annotation will be unchanged. This flag is useful when you want to + perform kubectl apply on this object in the future. + --show-managed-fields=false + If true, keep the managedFields when printing objects in JSON or YAML format. + --template='' + Template string or path to template file to use when -o=go-template, + -o=go-template-file. The template format is golang templates + [http://golang.org/pkg/text/template/#pkg-overview]. + --validate=true + If true, use a schema to validate the input before sending it +``` + +{{ header }} Options inherited from parent commands + +```shell + --as='' + Username to impersonate for the operation. User could be a regular user or a service + account in a namespace. + --as-group=[] + Group to impersonate for the operation, this flag can be repeated to specify multiple + groups. + --as-uid='' + UID to impersonate for the operation. + --cache-dir='~/.kube/cache' + Default cache directory + --certificate-authority='' + Path to a cert file for the certificate authority + --client-certificate='' + Path to a client certificate file for TLS + --client-key='' + Path to a client key file for TLS + --cluster='' + The name of the kubeconfig cluster to use + --context='' + The name of the kubeconfig context to use + --insecure-skip-tls-verify=false + If true, the server`s certificate will not be checked for validity. This will make your + HTTPS connections insecure + --kubeconfig='' + Path to the kubeconfig file to use for CLI requests. + --match-server-version=false + Require server version to match client version + -n, --namespace='' + If present, the namespace scope for this CLI request + --password='' + Password for basic authentication to the API server + --profile='none' + Name of profile to capture. One of (none|cpu|heap|goroutine|threadcreate|block|mutex) + --profile-output='profile.pprof' + Name of the file to write the profile to + --request-timeout='0' + The length of time to wait before giving up on a single server request. Non-zero values + should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don`t + timeout requests. + -s, --server='' + The address and port of the Kubernetes API server + --tls-server-name='' + Server name to use for server certificate validation. If it is not provided, the + hostname used to contact the server is used + --token='' + Bearer token for authentication to the API server + --user='' + The name of the kubeconfig user to use + --username='' + Username for basic authentication to the API server + --warnings-as-errors=false + Treat warnings received from the server as errors and exit with a non-zero exit code +``` + diff --git a/docs/_includes/reference/cli/werf_kubectl_create_deployment.short.md b/docs/_includes/reference/cli/werf_kubectl_create_deployment.short.md new file mode 100644 index 0000000000..40e2e5a5dc --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_create_deployment.short.md @@ -0,0 +1 @@ +create a deployment with the specified name \ No newline at end of file diff --git a/docs/_includes/reference/cli/werf_kubectl_create_ingress.md b/docs/_includes/reference/cli/werf_kubectl_create_ingress.md new file mode 100644 index 0000000000..2e3181cc2d --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_create_ingress.md @@ -0,0 +1,148 @@ +{% if include.header %} +{% assign header = include.header %} +{% else %} +{% assign header = "###" %} +{% endif %} +Create an ingress with the specified name. + +{{ header }} Syntax + +```shell +werf kubectl create ingress NAME --rule=host/path=service:port[,tls[=secret]] [options] +``` + +{{ header }} Examples + +```shell + # Create a single ingress called 'simple' that directs requests to foo.com/bar to svc + # svc1:8080 with a tls secret "my-cert" + kubectl create ingress simple --rule="foo.com/bar=svc1:8080,tls=my-cert" + + # Create a catch all ingress of "/path" pointing to service svc:port and Ingress Class as "otheringress" + kubectl create ingress catch-all --class=otheringress --rule="/path=svc:port" + + # Create an ingress with two annotations: ingress.annotation1 and ingress.annotations2 + kubectl create ingress annotated --class=default --rule="foo.com/bar=svc:port" \ + --annotation ingress.annotation1=foo \ + --annotation ingress.annotation2=bla + + # Create an ingress with the same host and multiple paths + kubectl create ingress multipath --class=default \ + --rule="foo.com/=svc:port" \ + --rule="foo.com/admin/=svcadmin:portadmin" + + # Create an ingress with multiple hosts and the pathType as Prefix + kubectl create ingress ingress1 --class=default \ + --rule="foo.com/path*=svc:8080" \ + --rule="bar.com/admin*=svc2:http" + + # Create an ingress with TLS enabled using the default ingress certificate and different path types + kubectl create ingress ingtls --class=default \ + --rule="foo.com/=svc:https,tls" \ + --rule="foo.com/path/subpath*=othersvc:8080" + + # Create an ingress with TLS enabled using a specific secret and pathType as Prefix + kubectl create ingress ingsecret --class=default \ + --rule="foo.com/*=svc:8080,tls=secret1" + + # Create an ingress with a default backend + kubectl create ingress ingdefault --class=default \ + --default-backend=defaultsvc:http \ + --rule="foo.com/*=svc:8080,tls=secret1" +``` + +{{ header }} Options + +```shell + --allow-missing-template-keys=true + If true, ignore any errors in templates when a field or map key is missing in the + template. Only applies to golang and jsonpath output formats. + --annotation=[] + Annotation to insert in the ingress object, in the format annotation=value + --class='' + Ingress Class to be used + --default-backend='' + Default service for backend, in format of svcname:port + --dry-run='none' + Must be "none", "server", or "client". If client strategy, only print the object that + would be sent, without sending it. If server strategy, submit server-side request + without persisting the resource. + --field-manager='kubectl-create' + Name of the manager used to track field ownership. + -o, --output='' + Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile + |jsonpath|jsonpath-as-json|jsonpath-file. + --rule=[] + Rule in format host/path=service:port[,tls=secretname]. Paths containing the leading + character `*` are considered pathType=Prefix. tls argument is optional. + --save-config=false + If true, the configuration of current object will be saved in its annotation. + Otherwise, the annotation will be unchanged. This flag is useful when you want to + perform kubectl apply on this object in the future. + --show-managed-fields=false + If true, keep the managedFields when printing objects in JSON or YAML format. + --template='' + Template string or path to template file to use when -o=go-template, + -o=go-template-file. The template format is golang templates + [http://golang.org/pkg/text/template/#pkg-overview]. + --validate=true + If true, use a schema to validate the input before sending it +``` + +{{ header }} Options inherited from parent commands + +```shell + --as='' + Username to impersonate for the operation. User could be a regular user or a service + account in a namespace. + --as-group=[] + Group to impersonate for the operation, this flag can be repeated to specify multiple + groups. + --as-uid='' + UID to impersonate for the operation. + --cache-dir='~/.kube/cache' + Default cache directory + --certificate-authority='' + Path to a cert file for the certificate authority + --client-certificate='' + Path to a client certificate file for TLS + --client-key='' + Path to a client key file for TLS + --cluster='' + The name of the kubeconfig cluster to use + --context='' + The name of the kubeconfig context to use + --insecure-skip-tls-verify=false + If true, the server`s certificate will not be checked for validity. This will make your + HTTPS connections insecure + --kubeconfig='' + Path to the kubeconfig file to use for CLI requests. + --match-server-version=false + Require server version to match client version + -n, --namespace='' + If present, the namespace scope for this CLI request + --password='' + Password for basic authentication to the API server + --profile='none' + Name of profile to capture. One of (none|cpu|heap|goroutine|threadcreate|block|mutex) + --profile-output='profile.pprof' + Name of the file to write the profile to + --request-timeout='0' + The length of time to wait before giving up on a single server request. Non-zero values + should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don`t + timeout requests. + -s, --server='' + The address and port of the Kubernetes API server + --tls-server-name='' + Server name to use for server certificate validation. If it is not provided, the + hostname used to contact the server is used + --token='' + Bearer token for authentication to the API server + --user='' + The name of the kubeconfig user to use + --username='' + Username for basic authentication to the API server + --warnings-as-errors=false + Treat warnings received from the server as errors and exit with a non-zero exit code +``` + diff --git a/docs/_includes/reference/cli/werf_kubectl_create_ingress.short.md b/docs/_includes/reference/cli/werf_kubectl_create_ingress.short.md new file mode 100644 index 0000000000..337513ac1d --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_create_ingress.short.md @@ -0,0 +1 @@ +create an ingress with the specified name \ No newline at end of file diff --git a/docs/_includes/reference/cli/werf_kubectl_create_job.md b/docs/_includes/reference/cli/werf_kubectl_create_job.md new file mode 100644 index 0000000000..9651e6d741 --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_create_job.md @@ -0,0 +1,116 @@ +{% if include.header %} +{% assign header = include.header %} +{% else %} +{% assign header = "###" %} +{% endif %} +Create a job with the specified name. + +{{ header }} Syntax + +```shell +werf kubectl create job NAME --image=image [--from=cronjob/name] -- [COMMAND] [args...] [options] +``` + +{{ header }} Examples + +```shell + # Create a job + kubectl create job my-job --image=busybox + + # Create a job with a command + kubectl create job my-job --image=busybox -- date + + # Create a job from a cron job named "a-cronjob" + kubectl create job test-job --from=cronjob/a-cronjob +``` + +{{ header }} Options + +```shell + --allow-missing-template-keys=true + If true, ignore any errors in templates when a field or map key is missing in the + template. Only applies to golang and jsonpath output formats. + --dry-run='none' + Must be "none", "server", or "client". If client strategy, only print the object that + would be sent, without sending it. If server strategy, submit server-side request + without persisting the resource. + --field-manager='kubectl-create' + Name of the manager used to track field ownership. + --from='' + The name of the resource to create a Job from (only cronjob is supported). + --image='' + Image name to run. + -o, --output='' + Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile + |jsonpath|jsonpath-as-json|jsonpath-file. + --save-config=false + If true, the configuration of current object will be saved in its annotation. + Otherwise, the annotation will be unchanged. This flag is useful when you want to + perform kubectl apply on this object in the future. + --show-managed-fields=false + If true, keep the managedFields when printing objects in JSON or YAML format. + --template='' + Template string or path to template file to use when -o=go-template, + -o=go-template-file. The template format is golang templates + [http://golang.org/pkg/text/template/#pkg-overview]. + --validate=true + If true, use a schema to validate the input before sending it +``` + +{{ header }} Options inherited from parent commands + +```shell + --as='' + Username to impersonate for the operation. User could be a regular user or a service + account in a namespace. + --as-group=[] + Group to impersonate for the operation, this flag can be repeated to specify multiple + groups. + --as-uid='' + UID to impersonate for the operation. + --cache-dir='~/.kube/cache' + Default cache directory + --certificate-authority='' + Path to a cert file for the certificate authority + --client-certificate='' + Path to a client certificate file for TLS + --client-key='' + Path to a client key file for TLS + --cluster='' + The name of the kubeconfig cluster to use + --context='' + The name of the kubeconfig context to use + --insecure-skip-tls-verify=false + If true, the server`s certificate will not be checked for validity. This will make your + HTTPS connections insecure + --kubeconfig='' + Path to the kubeconfig file to use for CLI requests. + --match-server-version=false + Require server version to match client version + -n, --namespace='' + If present, the namespace scope for this CLI request + --password='' + Password for basic authentication to the API server + --profile='none' + Name of profile to capture. One of (none|cpu|heap|goroutine|threadcreate|block|mutex) + --profile-output='profile.pprof' + Name of the file to write the profile to + --request-timeout='0' + The length of time to wait before giving up on a single server request. Non-zero values + should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don`t + timeout requests. + -s, --server='' + The address and port of the Kubernetes API server + --tls-server-name='' + Server name to use for server certificate validation. If it is not provided, the + hostname used to contact the server is used + --token='' + Bearer token for authentication to the API server + --user='' + The name of the kubeconfig user to use + --username='' + Username for basic authentication to the API server + --warnings-as-errors=false + Treat warnings received from the server as errors and exit with a non-zero exit code +``` + diff --git a/docs/_includes/reference/cli/werf_kubectl_create_job.short.md b/docs/_includes/reference/cli/werf_kubectl_create_job.short.md new file mode 100644 index 0000000000..838b39d0da --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_create_job.short.md @@ -0,0 +1 @@ +create a job with the specified name \ No newline at end of file diff --git a/docs/_includes/reference/cli/werf_kubectl_create_namespace.md b/docs/_includes/reference/cli/werf_kubectl_create_namespace.md new file mode 100644 index 0000000000..ef71d79043 --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_create_namespace.md @@ -0,0 +1,106 @@ +{% if include.header %} +{% assign header = include.header %} +{% else %} +{% assign header = "###" %} +{% endif %} +Create a namespace with the specified name. + +{{ header }} Syntax + +```shell +werf kubectl create namespace NAME [--dry-run=server|client|none] [options] +``` + +{{ header }} Examples + +```shell + # Create a new namespace named my-namespace + kubectl create namespace my-namespace +``` + +{{ header }} Options + +```shell + --allow-missing-template-keys=true + If true, ignore any errors in templates when a field or map key is missing in the + template. Only applies to golang and jsonpath output formats. + --dry-run='none' + Must be "none", "server", or "client". If client strategy, only print the object that + would be sent, without sending it. If server strategy, submit server-side request + without persisting the resource. + --field-manager='kubectl-create' + Name of the manager used to track field ownership. + -o, --output='' + Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile + |jsonpath|jsonpath-as-json|jsonpath-file. + --save-config=false + If true, the configuration of current object will be saved in its annotation. + Otherwise, the annotation will be unchanged. This flag is useful when you want to + perform kubectl apply on this object in the future. + --show-managed-fields=false + If true, keep the managedFields when printing objects in JSON or YAML format. + --template='' + Template string or path to template file to use when -o=go-template, + -o=go-template-file. The template format is golang templates + [http://golang.org/pkg/text/template/#pkg-overview]. + --validate=true + If true, use a schema to validate the input before sending it +``` + +{{ header }} Options inherited from parent commands + +```shell + --as='' + Username to impersonate for the operation. User could be a regular user or a service + account in a namespace. + --as-group=[] + Group to impersonate for the operation, this flag can be repeated to specify multiple + groups. + --as-uid='' + UID to impersonate for the operation. + --cache-dir='~/.kube/cache' + Default cache directory + --certificate-authority='' + Path to a cert file for the certificate authority + --client-certificate='' + Path to a client certificate file for TLS + --client-key='' + Path to a client key file for TLS + --cluster='' + The name of the kubeconfig cluster to use + --context='' + The name of the kubeconfig context to use + --insecure-skip-tls-verify=false + If true, the server`s certificate will not be checked for validity. This will make your + HTTPS connections insecure + --kubeconfig='' + Path to the kubeconfig file to use for CLI requests. + --match-server-version=false + Require server version to match client version + -n, --namespace='' + If present, the namespace scope for this CLI request + --password='' + Password for basic authentication to the API server + --profile='none' + Name of profile to capture. One of (none|cpu|heap|goroutine|threadcreate|block|mutex) + --profile-output='profile.pprof' + Name of the file to write the profile to + --request-timeout='0' + The length of time to wait before giving up on a single server request. Non-zero values + should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don`t + timeout requests. + -s, --server='' + The address and port of the Kubernetes API server + --tls-server-name='' + Server name to use for server certificate validation. If it is not provided, the + hostname used to contact the server is used + --token='' + Bearer token for authentication to the API server + --user='' + The name of the kubeconfig user to use + --username='' + Username for basic authentication to the API server + --warnings-as-errors=false + Treat warnings received from the server as errors and exit with a non-zero exit code +``` + diff --git a/docs/_includes/reference/cli/werf_kubectl_create_namespace.short.md b/docs/_includes/reference/cli/werf_kubectl_create_namespace.short.md new file mode 100644 index 0000000000..0bdb473ef8 --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_create_namespace.short.md @@ -0,0 +1 @@ +create a namespace with the specified name \ No newline at end of file diff --git a/docs/_includes/reference/cli/werf_kubectl_create_poddisruptionbudget.md b/docs/_includes/reference/cli/werf_kubectl_create_poddisruptionbudget.md new file mode 100644 index 0000000000..e96e3871b1 --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_create_poddisruptionbudget.md @@ -0,0 +1,118 @@ +{% if include.header %} +{% assign header = include.header %} +{% else %} +{% assign header = "###" %} +{% endif %} +Create a pod disruption budget with the specified name, selector, and desired minimum available pods. + +{{ header }} Syntax + +```shell +werf kubectl create poddisruptionbudget NAME --selector=SELECTOR --min-available=N [--dry-run=server|client|none] [options] +``` + +{{ header }} Examples + +```shell + # Create a pod disruption budget named my-pdb that will select all pods with the app=rails label + # and require at least one of them being available at any point in time + kubectl create poddisruptionbudget my-pdb --selector=app=rails --min-available=1 + + # Create a pod disruption budget named my-pdb that will select all pods with the app=nginx label + # and require at least half of the pods selected to be available at any point in time + kubectl create pdb my-pdb --selector=app=nginx --min-available=50% +``` + +{{ header }} Options + +```shell + --allow-missing-template-keys=true + If true, ignore any errors in templates when a field or map key is missing in the + template. Only applies to golang and jsonpath output formats. + --dry-run='none' + Must be "none", "server", or "client". If client strategy, only print the object that + would be sent, without sending it. If server strategy, submit server-side request + without persisting the resource. + --field-manager='kubectl-create' + Name of the manager used to track field ownership. + --max-unavailable='' + The maximum number or percentage of unavailable pods this budget requires. + --min-available='' + The minimum number or percentage of available pods this budget requires. + -o, --output='' + Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile + |jsonpath|jsonpath-as-json|jsonpath-file. + --save-config=false + If true, the configuration of current object will be saved in its annotation. + Otherwise, the annotation will be unchanged. This flag is useful when you want to + perform kubectl apply on this object in the future. + --selector='' + A label selector to use for this budget. Only equality-based selector requirements are + supported. + --show-managed-fields=false + If true, keep the managedFields when printing objects in JSON or YAML format. + --template='' + Template string or path to template file to use when -o=go-template, + -o=go-template-file. The template format is golang templates + [http://golang.org/pkg/text/template/#pkg-overview]. + --validate=true + If true, use a schema to validate the input before sending it +``` + +{{ header }} Options inherited from parent commands + +```shell + --as='' + Username to impersonate for the operation. User could be a regular user or a service + account in a namespace. + --as-group=[] + Group to impersonate for the operation, this flag can be repeated to specify multiple + groups. + --as-uid='' + UID to impersonate for the operation. + --cache-dir='~/.kube/cache' + Default cache directory + --certificate-authority='' + Path to a cert file for the certificate authority + --client-certificate='' + Path to a client certificate file for TLS + --client-key='' + Path to a client key file for TLS + --cluster='' + The name of the kubeconfig cluster to use + --context='' + The name of the kubeconfig context to use + --insecure-skip-tls-verify=false + If true, the server`s certificate will not be checked for validity. This will make your + HTTPS connections insecure + --kubeconfig='' + Path to the kubeconfig file to use for CLI requests. + --match-server-version=false + Require server version to match client version + -n, --namespace='' + If present, the namespace scope for this CLI request + --password='' + Password for basic authentication to the API server + --profile='none' + Name of profile to capture. One of (none|cpu|heap|goroutine|threadcreate|block|mutex) + --profile-output='profile.pprof' + Name of the file to write the profile to + --request-timeout='0' + The length of time to wait before giving up on a single server request. Non-zero values + should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don`t + timeout requests. + -s, --server='' + The address and port of the Kubernetes API server + --tls-server-name='' + Server name to use for server certificate validation. If it is not provided, the + hostname used to contact the server is used + --token='' + Bearer token for authentication to the API server + --user='' + The name of the kubeconfig user to use + --username='' + Username for basic authentication to the API server + --warnings-as-errors=false + Treat warnings received from the server as errors and exit with a non-zero exit code +``` + diff --git a/docs/_includes/reference/cli/werf_kubectl_create_poddisruptionbudget.short.md b/docs/_includes/reference/cli/werf_kubectl_create_poddisruptionbudget.short.md new file mode 100644 index 0000000000..427e03164e --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_create_poddisruptionbudget.short.md @@ -0,0 +1 @@ +create a pod disruption budget with the specified name \ No newline at end of file diff --git a/docs/_includes/reference/cli/werf_kubectl_create_priorityclass.md b/docs/_includes/reference/cli/werf_kubectl_create_priorityclass.md new file mode 100644 index 0000000000..ea57656907 --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_create_priorityclass.md @@ -0,0 +1,122 @@ +{% if include.header %} +{% assign header = include.header %} +{% else %} +{% assign header = "###" %} +{% endif %} +Create a priority class with the specified name, value, globalDefault and description. + +{{ header }} Syntax + +```shell +werf kubectl create priorityclass NAME --value=VALUE --global-default=BOOL [--dry-run=server|client|none] [options] +``` + +{{ header }} Examples + +```shell + # Create a priority class named high-priority + kubectl create priorityclass high-priority --value=1000 --description="high priority" + + # Create a priority class named default-priority that is considered as the global default priority + kubectl create priorityclass default-priority --value=1000 --global-default=true --description="default priority" + + # Create a priority class named high-priority that cannot preempt pods with lower priority + kubectl create priorityclass high-priority --value=1000 --description="high priority" --preemption-policy="Never" +``` + +{{ header }} Options + +```shell + --allow-missing-template-keys=true + If true, ignore any errors in templates when a field or map key is missing in the + template. Only applies to golang and jsonpath output formats. + --description='' + description is an arbitrary string that usually provides guidelines on when this + priority class should be used. + --dry-run='none' + Must be "none", "server", or "client". If client strategy, only print the object that + would be sent, without sending it. If server strategy, submit server-side request + without persisting the resource. + --field-manager='kubectl-create' + Name of the manager used to track field ownership. + --global-default=false + global-default specifies whether this PriorityClass should be considered as the default + priority. + -o, --output='' + Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile + |jsonpath|jsonpath-as-json|jsonpath-file. + --preemption-policy='PreemptLowerPriority' + preemption-policy is the policy for preempting pods with lower priority. + --save-config=false + If true, the configuration of current object will be saved in its annotation. + Otherwise, the annotation will be unchanged. This flag is useful when you want to + perform kubectl apply on this object in the future. + --show-managed-fields=false + If true, keep the managedFields when printing objects in JSON or YAML format. + --template='' + Template string or path to template file to use when -o=go-template, + -o=go-template-file. The template format is golang templates + [http://golang.org/pkg/text/template/#pkg-overview]. + --validate=true + If true, use a schema to validate the input before sending it + --value=0 + the value of this priority class. +``` + +{{ header }} Options inherited from parent commands + +```shell + --as='' + Username to impersonate for the operation. User could be a regular user or a service + account in a namespace. + --as-group=[] + Group to impersonate for the operation, this flag can be repeated to specify multiple + groups. + --as-uid='' + UID to impersonate for the operation. + --cache-dir='~/.kube/cache' + Default cache directory + --certificate-authority='' + Path to a cert file for the certificate authority + --client-certificate='' + Path to a client certificate file for TLS + --client-key='' + Path to a client key file for TLS + --cluster='' + The name of the kubeconfig cluster to use + --context='' + The name of the kubeconfig context to use + --insecure-skip-tls-verify=false + If true, the server`s certificate will not be checked for validity. This will make your + HTTPS connections insecure + --kubeconfig='' + Path to the kubeconfig file to use for CLI requests. + --match-server-version=false + Require server version to match client version + -n, --namespace='' + If present, the namespace scope for this CLI request + --password='' + Password for basic authentication to the API server + --profile='none' + Name of profile to capture. One of (none|cpu|heap|goroutine|threadcreate|block|mutex) + --profile-output='profile.pprof' + Name of the file to write the profile to + --request-timeout='0' + The length of time to wait before giving up on a single server request. Non-zero values + should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don`t + timeout requests. + -s, --server='' + The address and port of the Kubernetes API server + --tls-server-name='' + Server name to use for server certificate validation. If it is not provided, the + hostname used to contact the server is used + --token='' + Bearer token for authentication to the API server + --user='' + The name of the kubeconfig user to use + --username='' + Username for basic authentication to the API server + --warnings-as-errors=false + Treat warnings received from the server as errors and exit with a non-zero exit code +``` + diff --git a/docs/_includes/reference/cli/werf_kubectl_create_priorityclass.short.md b/docs/_includes/reference/cli/werf_kubectl_create_priorityclass.short.md new file mode 100644 index 0000000000..ddea215dab --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_create_priorityclass.short.md @@ -0,0 +1 @@ +create a priority class with the specified name \ No newline at end of file diff --git a/docs/_includes/reference/cli/werf_kubectl_create_quota.md b/docs/_includes/reference/cli/werf_kubectl_create_quota.md new file mode 100644 index 0000000000..6258d3108c --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_create_quota.md @@ -0,0 +1,114 @@ +{% if include.header %} +{% assign header = include.header %} +{% else %} +{% assign header = "###" %} +{% endif %} +Create a resource quota with the specified name, hard limits, and optional scopes. + +{{ header }} Syntax + +```shell +werf kubectl create quota NAME [--hard=key1=value1,key2=value2] [--scopes=Scope1,Scope2] [--dry-run=server|client|none] [options] +``` + +{{ header }} Examples + +```shell + # Create a new resource quota named my-quota + kubectl create quota my-quota --hard=cpu=1,memory=1G,pods=2,services=3,replicationcontrollers=2,resourcequotas=1,secrets=5,persistentvolumeclaims=10 + + # Create a new resource quota named best-effort + kubectl create quota best-effort --hard=pods=100 --scopes=BestEffort +``` + +{{ header }} Options + +```shell + --allow-missing-template-keys=true + If true, ignore any errors in templates when a field or map key is missing in the + template. Only applies to golang and jsonpath output formats. + --dry-run='none' + Must be "none", "server", or "client". If client strategy, only print the object that + would be sent, without sending it. If server strategy, submit server-side request + without persisting the resource. + --field-manager='kubectl-create' + Name of the manager used to track field ownership. + --hard='' + A comma-delimited set of resource=quantity pairs that define a hard limit. + -o, --output='' + Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile + |jsonpath|jsonpath-as-json|jsonpath-file. + --save-config=false + If true, the configuration of current object will be saved in its annotation. + Otherwise, the annotation will be unchanged. This flag is useful when you want to + perform kubectl apply on this object in the future. + --scopes='' + A comma-delimited set of quota scopes that must all match each object tracked by the + quota. + --show-managed-fields=false + If true, keep the managedFields when printing objects in JSON or YAML format. + --template='' + Template string or path to template file to use when -o=go-template, + -o=go-template-file. The template format is golang templates + [http://golang.org/pkg/text/template/#pkg-overview]. + --validate=true + If true, use a schema to validate the input before sending it +``` + +{{ header }} Options inherited from parent commands + +```shell + --as='' + Username to impersonate for the operation. User could be a regular user or a service + account in a namespace. + --as-group=[] + Group to impersonate for the operation, this flag can be repeated to specify multiple + groups. + --as-uid='' + UID to impersonate for the operation. + --cache-dir='~/.kube/cache' + Default cache directory + --certificate-authority='' + Path to a cert file for the certificate authority + --client-certificate='' + Path to a client certificate file for TLS + --client-key='' + Path to a client key file for TLS + --cluster='' + The name of the kubeconfig cluster to use + --context='' + The name of the kubeconfig context to use + --insecure-skip-tls-verify=false + If true, the server`s certificate will not be checked for validity. This will make your + HTTPS connections insecure + --kubeconfig='' + Path to the kubeconfig file to use for CLI requests. + --match-server-version=false + Require server version to match client version + -n, --namespace='' + If present, the namespace scope for this CLI request + --password='' + Password for basic authentication to the API server + --profile='none' + Name of profile to capture. One of (none|cpu|heap|goroutine|threadcreate|block|mutex) + --profile-output='profile.pprof' + Name of the file to write the profile to + --request-timeout='0' + The length of time to wait before giving up on a single server request. Non-zero values + should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don`t + timeout requests. + -s, --server='' + The address and port of the Kubernetes API server + --tls-server-name='' + Server name to use for server certificate validation. If it is not provided, the + hostname used to contact the server is used + --token='' + Bearer token for authentication to the API server + --user='' + The name of the kubeconfig user to use + --username='' + Username for basic authentication to the API server + --warnings-as-errors=false + Treat warnings received from the server as errors and exit with a non-zero exit code +``` + diff --git a/docs/_includes/reference/cli/werf_kubectl_create_quota.short.md b/docs/_includes/reference/cli/werf_kubectl_create_quota.short.md new file mode 100644 index 0000000000..dd6ad72e13 --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_create_quota.short.md @@ -0,0 +1 @@ +create a quota with the specified name \ No newline at end of file diff --git a/docs/_includes/reference/cli/werf_kubectl_create_role.md b/docs/_includes/reference/cli/werf_kubectl_create_role.md new file mode 100644 index 0000000000..4799223bda --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_create_role.md @@ -0,0 +1,121 @@ +{% if include.header %} +{% assign header = include.header %} +{% else %} +{% assign header = "###" %} +{% endif %} +Create a role with single rule. + +{{ header }} Syntax + +```shell +werf kubectl create role NAME --verb=verb --resource=resource.group/subresource [--resource-name=resourcename] [--dry-run=server|client|none] [options] +``` + +{{ header }} Examples + +```shell + # Create a role named "pod-reader" that allows user to perform "get", "watch" and "list" on pods + kubectl create role pod-reader --verb=get --verb=list --verb=watch --resource=pods + + # Create a role named "pod-reader" with ResourceName specified + kubectl create role pod-reader --verb=get --resource=pods --resource-name=readablepod --resource-name=anotherpod + + # Create a role named "foo" with API Group specified + kubectl create role foo --verb=get,list,watch --resource=rs.extensions + + # Create a role named "foo" with SubResource specified + kubectl create role foo --verb=get,list,watch --resource=pods,pods/status +``` + +{{ header }} Options + +```shell + --allow-missing-template-keys=true + If true, ignore any errors in templates when a field or map key is missing in the + template. Only applies to golang and jsonpath output formats. + --dry-run='none' + Must be "none", "server", or "client". If client strategy, only print the object that + would be sent, without sending it. If server strategy, submit server-side request + without persisting the resource. + --field-manager='kubectl-create' + Name of the manager used to track field ownership. + -o, --output='' + Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile + |jsonpath|jsonpath-as-json|jsonpath-file. + --resource=[] + Resource that the rule applies to + --resource-name=[] + Resource in the white list that the rule applies to, repeat this flag for multiple items + --save-config=false + If true, the configuration of current object will be saved in its annotation. + Otherwise, the annotation will be unchanged. This flag is useful when you want to + perform kubectl apply on this object in the future. + --show-managed-fields=false + If true, keep the managedFields when printing objects in JSON or YAML format. + --template='' + Template string or path to template file to use when -o=go-template, + -o=go-template-file. The template format is golang templates + [http://golang.org/pkg/text/template/#pkg-overview]. + --validate=true + If true, use a schema to validate the input before sending it + --verb=[] + Verb that applies to the resources contained in the rule +``` + +{{ header }} Options inherited from parent commands + +```shell + --as='' + Username to impersonate for the operation. User could be a regular user or a service + account in a namespace. + --as-group=[] + Group to impersonate for the operation, this flag can be repeated to specify multiple + groups. + --as-uid='' + UID to impersonate for the operation. + --cache-dir='~/.kube/cache' + Default cache directory + --certificate-authority='' + Path to a cert file for the certificate authority + --client-certificate='' + Path to a client certificate file for TLS + --client-key='' + Path to a client key file for TLS + --cluster='' + The name of the kubeconfig cluster to use + --context='' + The name of the kubeconfig context to use + --insecure-skip-tls-verify=false + If true, the server`s certificate will not be checked for validity. This will make your + HTTPS connections insecure + --kubeconfig='' + Path to the kubeconfig file to use for CLI requests. + --match-server-version=false + Require server version to match client version + -n, --namespace='' + If present, the namespace scope for this CLI request + --password='' + Password for basic authentication to the API server + --profile='none' + Name of profile to capture. One of (none|cpu|heap|goroutine|threadcreate|block|mutex) + --profile-output='profile.pprof' + Name of the file to write the profile to + --request-timeout='0' + The length of time to wait before giving up on a single server request. Non-zero values + should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don`t + timeout requests. + -s, --server='' + The address and port of the Kubernetes API server + --tls-server-name='' + Server name to use for server certificate validation. If it is not provided, the + hostname used to contact the server is used + --token='' + Bearer token for authentication to the API server + --user='' + The name of the kubeconfig user to use + --username='' + Username for basic authentication to the API server + --warnings-as-errors=false + Treat warnings received from the server as errors and exit with a non-zero exit code +``` + diff --git a/docs/_includes/reference/cli/werf_kubectl_create_role.short.md b/docs/_includes/reference/cli/werf_kubectl_create_role.short.md new file mode 100644 index 0000000000..c2bc60e270 --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_create_role.short.md @@ -0,0 +1 @@ +create a role with single rule \ No newline at end of file diff --git a/docs/_includes/reference/cli/werf_kubectl_create_rolebinding.md b/docs/_includes/reference/cli/werf_kubectl_create_rolebinding.md new file mode 100644 index 0000000000..920c0f711d --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_create_rolebinding.md @@ -0,0 +1,114 @@ +{% if include.header %} +{% assign header = include.header %} +{% else %} +{% assign header = "###" %} +{% endif %} +Create a role binding for a particular role or cluster role. + +{{ header }} Syntax + +```shell +werf kubectl create rolebinding NAME --clusterrole=NAME|--role=NAME [--user=username] [--group=groupname] [--serviceaccount=namespace:serviceaccountname] [--dry-run=server|client|none] [options] +``` + +{{ header }} Examples + +```shell + # Create a role binding for user1, user2, and group1 using the admin cluster role + kubectl create rolebinding admin --clusterrole=admin --user=user1 --user=user2 --group=group1 +``` + +{{ header }} Options + +```shell + --allow-missing-template-keys=true + If true, ignore any errors in templates when a field or map key is missing in the + template. Only applies to golang and jsonpath output formats. + --clusterrole='' + ClusterRole this RoleBinding should reference + --dry-run='none' + Must be "none", "server", or "client". If client strategy, only print the object that + would be sent, without sending it. If server strategy, submit server-side request + without persisting the resource. + --field-manager='kubectl-create' + Name of the manager used to track field ownership. + --group=[] + Groups to bind to the role + -o, --output='' + Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile + |jsonpath|jsonpath-as-json|jsonpath-file. + --role='' + Role this RoleBinding should reference + --save-config=false + If true, the configuration of current object will be saved in its annotation. + Otherwise, the annotation will be unchanged. This flag is useful when you want to + perform kubectl apply on this object in the future. + --serviceaccount=[] + Service accounts to bind to the role, in the format : + --show-managed-fields=false + If true, keep the managedFields when printing objects in JSON or YAML format. + --template='' + Template string or path to template file to use when -o=go-template, + -o=go-template-file. The template format is golang templates + [http://golang.org/pkg/text/template/#pkg-overview]. + --validate=true + If true, use a schema to validate the input before sending it +``` + +{{ header }} Options inherited from parent commands + +```shell + --as='' + Username to impersonate for the operation. User could be a regular user or a service + account in a namespace. + --as-group=[] + Group to impersonate for the operation, this flag can be repeated to specify multiple + groups. + --as-uid='' + UID to impersonate for the operation. + --cache-dir='~/.kube/cache' + Default cache directory + --certificate-authority='' + Path to a cert file for the certificate authority + --client-certificate='' + Path to a client certificate file for TLS + --client-key='' + Path to a client key file for TLS + --cluster='' + The name of the kubeconfig cluster to use + --context='' + The name of the kubeconfig context to use + --insecure-skip-tls-verify=false + If true, the server`s certificate will not be checked for validity. This will make your + HTTPS connections insecure + --kubeconfig='' + Path to the kubeconfig file to use for CLI requests. + --match-server-version=false + Require server version to match client version + -n, --namespace='' + If present, the namespace scope for this CLI request + --password='' + Password for basic authentication to the API server + --profile='none' + Name of profile to capture. One of (none|cpu|heap|goroutine|threadcreate|block|mutex) + --profile-output='profile.pprof' + Name of the file to write the profile to + --request-timeout='0' + The length of time to wait before giving up on a single server request. Non-zero values + should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don`t + timeout requests. + -s, --server='' + The address and port of the Kubernetes API server + --tls-server-name='' + Server name to use for server certificate validation. If it is not provided, the + hostname used to contact the server is used + --token='' + Bearer token for authentication to the API server + --user='' + The name of the kubeconfig user to use + --username='' + Username for basic authentication to the API server + --warnings-as-errors=false + Treat warnings received from the server as errors and exit with a non-zero exit code +``` + diff --git a/docs/_includes/reference/cli/werf_kubectl_create_rolebinding.short.md b/docs/_includes/reference/cli/werf_kubectl_create_rolebinding.short.md new file mode 100644 index 0000000000..a75fef540f --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_create_rolebinding.short.md @@ -0,0 +1 @@ +create a role binding for a particular role or cluster role \ No newline at end of file diff --git a/docs/_includes/reference/cli/werf_kubectl_create_secret.md b/docs/_includes/reference/cli/werf_kubectl_create_secret.md new file mode 100644 index 0000000000..c497fbe35f --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_create_secret.md @@ -0,0 +1,70 @@ +{% if include.header %} +{% assign header = include.header %} +{% else %} +{% assign header = "###" %} +{% endif %} +Create a secret using specified subcommand. + +{{ header }} Syntax + +```shell +werf kubectl create secret +``` + +{{ header }} Options inherited from parent commands + +```shell + --as='' + Username to impersonate for the operation. User could be a regular user or a service + account in a namespace. + --as-group=[] + Group to impersonate for the operation, this flag can be repeated to specify multiple + groups. + --as-uid='' + UID to impersonate for the operation. + --cache-dir='~/.kube/cache' + Default cache directory + --certificate-authority='' + Path to a cert file for the certificate authority + --client-certificate='' + Path to a client certificate file for TLS + --client-key='' + Path to a client key file for TLS + --cluster='' + The name of the kubeconfig cluster to use + --context='' + The name of the kubeconfig context to use + --insecure-skip-tls-verify=false + If true, the server`s certificate will not be checked for validity. This will make your + HTTPS connections insecure + --kubeconfig='' + Path to the kubeconfig file to use for CLI requests. + --match-server-version=false + Require server version to match client version + -n, --namespace='' + If present, the namespace scope for this CLI request + --password='' + Password for basic authentication to the API server + --profile='none' + Name of profile to capture. One of (none|cpu|heap|goroutine|threadcreate|block|mutex) + --profile-output='profile.pprof' + Name of the file to write the profile to + --request-timeout='0' + The length of time to wait before giving up on a single server request. Non-zero values + should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don`t + timeout requests. + -s, --server='' + The address and port of the Kubernetes API server + --tls-server-name='' + Server name to use for server certificate validation. If it is not provided, the + hostname used to contact the server is used + --token='' + Bearer token for authentication to the API server + --user='' + The name of the kubeconfig user to use + --username='' + Username for basic authentication to the API server + --warnings-as-errors=false + Treat warnings received from the server as errors and exit with a non-zero exit code +``` + diff --git a/docs/_includes/reference/cli/werf_kubectl_create_secret.short.md b/docs/_includes/reference/cli/werf_kubectl_create_secret.short.md new file mode 100644 index 0000000000..5ef0d72ef6 --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_create_secret.short.md @@ -0,0 +1 @@ +create a secret using specified subcommand \ No newline at end of file diff --git a/docs/_includes/reference/cli/werf_kubectl_create_secret_docker_registry.md b/docs/_includes/reference/cli/werf_kubectl_create_secret_docker_registry.md new file mode 100644 index 0000000000..ba598a2e81 --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_create_secret_docker_registry.md @@ -0,0 +1,135 @@ +{% if include.header %} +{% assign header = include.header %} +{% else %} +{% assign header = "###" %} +{% endif %} +Create a new secret for use with Docker registries. + + Dockercfg secrets are used to authenticate against Docker registries. + + When using the Docker command line to push images, you can authenticate to a given registry by running: + '$ docker login DOCKER_REGISTRY_SERVER --username=DOCKER_USER --password=DOCKER_PASSWORD --email=DOCKER_EMAIL'. + + That produces a ~/.dockercfg file that is used by subsequent 'docker push' and 'docker pull' commands to authenticate to the registry. The email address is optional. + + When creating applications, you may have a Docker registry that requires authentication. In order for the + nodes to pull images on your behalf, they must have the credentials. You can provide this information + by creating a dockercfg secret and attaching it to your service account. + +{{ header }} Syntax + +```shell +werf kubectl create secret docker-registry NAME --docker-username=user --docker-password=password --docker-email=email [--docker-server=string] [--from-file=[key=]source] [--dry-run=server|client|none] [options] +``` + +{{ header }} Examples + +```shell + # If you don't already have a .dockercfg file, you can create a dockercfg secret directly by using: + kubectl create secret docker-registry my-secret --docker-server=DOCKER_REGISTRY_SERVER --docker-username=DOCKER_USER --docker-password=DOCKER_PASSWORD --docker-email=DOCKER_EMAIL + + # Create a new secret named my-secret from ~/.docker/config.json + kubectl create secret docker-registry my-secret --from-file=.dockerconfigjson=path/to/.docker/config.json +``` + +{{ header }} Options + +```shell + --allow-missing-template-keys=true + If true, ignore any errors in templates when a field or map key is missing in the + template. Only applies to golang and jsonpath output formats. + --append-hash=false + Append a hash of the secret to its name. + --docker-email='' + Email for Docker registry + --docker-password='' + Password for Docker registry authentication + --docker-server='https://index.docker.io/v1/' + Server location for Docker registry + --docker-username='' + Username for Docker registry authentication + --dry-run='none' + Must be "none", "server", or "client". If client strategy, only print the object that + would be sent, without sending it. If server strategy, submit server-side request + without persisting the resource. + --field-manager='kubectl-create' + Name of the manager used to track field ownership. + --from-file=[] + Key files can be specified using their file path, in which case a default name will be + given to them, or optionally with a name and file path, in which case the given name + will be used. Specifying a directory will iterate each named file in the directory + that is a valid secret key. + -o, --output='' + Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile + |jsonpath|jsonpath-as-json|jsonpath-file. + --save-config=false + If true, the configuration of current object will be saved in its annotation. + Otherwise, the annotation will be unchanged. This flag is useful when you want to + perform kubectl apply on this object in the future. + --show-managed-fields=false + If true, keep the managedFields when printing objects in JSON or YAML format. + --template='' + Template string or path to template file to use when -o=go-template, + -o=go-template-file. The template format is golang templates + [http://golang.org/pkg/text/template/#pkg-overview]. + --validate=true + If true, use a schema to validate the input before sending it +``` + +{{ header }} Options inherited from parent commands + +```shell + --as='' + Username to impersonate for the operation. User could be a regular user or a service + account in a namespace. + --as-group=[] + Group to impersonate for the operation, this flag can be repeated to specify multiple + groups. + --as-uid='' + UID to impersonate for the operation. + --cache-dir='~/.kube/cache' + Default cache directory + --certificate-authority='' + Path to a cert file for the certificate authority + --client-certificate='' + Path to a client certificate file for TLS + --client-key='' + Path to a client key file for TLS + --cluster='' + The name of the kubeconfig cluster to use + --context='' + The name of the kubeconfig context to use + --insecure-skip-tls-verify=false + If true, the server`s certificate will not be checked for validity. This will make your + HTTPS connections insecure + --kubeconfig='' + Path to the kubeconfig file to use for CLI requests. + --match-server-version=false + Require server version to match client version + -n, --namespace='' + If present, the namespace scope for this CLI request + --password='' + Password for basic authentication to the API server + --profile='none' + Name of profile to capture. One of (none|cpu|heap|goroutine|threadcreate|block|mutex) + --profile-output='profile.pprof' + Name of the file to write the profile to + --request-timeout='0' + The length of time to wait before giving up on a single server request. Non-zero values + should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don`t + timeout requests. + -s, --server='' + The address and port of the Kubernetes API server + --tls-server-name='' + Server name to use for server certificate validation. If it is not provided, the + hostname used to contact the server is used + --token='' + Bearer token for authentication to the API server + --user='' + The name of the kubeconfig user to use + --username='' + Username for basic authentication to the API server + --warnings-as-errors=false + Treat warnings received from the server as errors and exit with a non-zero exit code +``` + diff --git a/docs/_includes/reference/cli/werf_kubectl_create_secret_docker_registry.short.md b/docs/_includes/reference/cli/werf_kubectl_create_secret_docker_registry.short.md new file mode 100644 index 0000000000..1f9aaef9c7 --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_create_secret_docker_registry.short.md @@ -0,0 +1 @@ +create a secret for use with a Docker registry \ No newline at end of file diff --git a/docs/_includes/reference/cli/werf_kubectl_create_secret_generic.md b/docs/_includes/reference/cli/werf_kubectl_create_secret_generic.md new file mode 100644 index 0000000000..ea9535c95e --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_create_secret_generic.md @@ -0,0 +1,138 @@ +{% if include.header %} +{% assign header = include.header %} +{% else %} +{% assign header = "###" %} +{% endif %} +Create a secret based on a file, directory, or specified literal value. + + A single secret may package one or more key/value pairs. + + When creating a secret based on a file, the key will default to the basename of the file, and the value will default to the file content. If the basename is an invalid key or you wish to chose your own, you may specify an alternate key. + + When creating a secret based on a directory, each file whose basename is a valid key in the directory will be packaged into the secret. Any directory entries except regular files are ignored (e.g. subdirectories, symlinks, devices, pipes, etc). + +{{ header }} Syntax + +```shell +werf kubectl create secret generic NAME [--type=string] [--from-file=[key=]source] [--from-literal=key1=value1] [--dry-run=server|client|none] [options] +``` + +{{ header }} Examples + +```shell + # Create a new secret named my-secret with keys for each file in folder bar + kubectl create secret generic my-secret --from-file=path/to/bar + + # Create a new secret named my-secret with specified keys instead of names on disk + kubectl create secret generic my-secret --from-file=ssh-privatekey=path/to/id_rsa --from-file=ssh-publickey=path/to/id_rsa.pub + + # Create a new secret named my-secret with key1=supersecret and key2=topsecret + kubectl create secret generic my-secret --from-literal=key1=supersecret --from-literal=key2=topsecret + + # Create a new secret named my-secret using a combination of a file and a literal + kubectl create secret generic my-secret --from-file=ssh-privatekey=path/to/id_rsa --from-literal=passphrase=topsecret + + # Create a new secret named my-secret from env files + kubectl create secret generic my-secret --from-env-file=path/to/foo.env --from-env-file=path/to/bar.env +``` + +{{ header }} Options + +```shell + --allow-missing-template-keys=true + If true, ignore any errors in templates when a field or map key is missing in the + template. Only applies to golang and jsonpath output formats. + --append-hash=false + Append a hash of the secret to its name. + --dry-run='none' + Must be "none", "server", or "client". If client strategy, only print the object that + would be sent, without sending it. If server strategy, submit server-side request + without persisting the resource. + --field-manager='kubectl-create' + Name of the manager used to track field ownership. + --from-env-file=[] + Specify the path to a file to read lines of key=val pairs to create a secret (i.e. a + Docker .env file). + --from-file=[] + Key files can be specified using their file path, in which case a default name will be + given to them, or optionally with a name and file path, in which case the given name + will be used. Specifying a directory will iterate each named file in the directory + that is a valid secret key. + --from-literal=[] + Specify a key and literal value to insert in secret (i.e. mykey=somevalue) + -o, --output='' + Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile + |jsonpath|jsonpath-as-json|jsonpath-file. + --save-config=false + If true, the configuration of current object will be saved in its annotation. + Otherwise, the annotation will be unchanged. This flag is useful when you want to + perform kubectl apply on this object in the future. + --show-managed-fields=false + If true, keep the managedFields when printing objects in JSON or YAML format. + --template='' + Template string or path to template file to use when -o=go-template, + -o=go-template-file. The template format is golang templates + [http://golang.org/pkg/text/template/#pkg-overview]. + --type='' + The type of secret to create + --validate=true + If true, use a schema to validate the input before sending it +``` + +{{ header }} Options inherited from parent commands + +```shell + --as='' + Username to impersonate for the operation. User could be a regular user or a service + account in a namespace. + --as-group=[] + Group to impersonate for the operation, this flag can be repeated to specify multiple + groups. + --as-uid='' + UID to impersonate for the operation. + --cache-dir='~/.kube/cache' + Default cache directory + --certificate-authority='' + Path to a cert file for the certificate authority + --client-certificate='' + Path to a client certificate file for TLS + --client-key='' + Path to a client key file for TLS + --cluster='' + The name of the kubeconfig cluster to use + --context='' + The name of the kubeconfig context to use + --insecure-skip-tls-verify=false + If true, the server`s certificate will not be checked for validity. This will make your + HTTPS connections insecure + --kubeconfig='' + Path to the kubeconfig file to use for CLI requests. + --match-server-version=false + Require server version to match client version + -n, --namespace='' + If present, the namespace scope for this CLI request + --password='' + Password for basic authentication to the API server + --profile='none' + Name of profile to capture. One of (none|cpu|heap|goroutine|threadcreate|block|mutex) + --profile-output='profile.pprof' + Name of the file to write the profile to + --request-timeout='0' + The length of time to wait before giving up on a single server request. Non-zero values + should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don`t + timeout requests. + -s, --server='' + The address and port of the Kubernetes API server + --tls-server-name='' + Server name to use for server certificate validation. If it is not provided, the + hostname used to contact the server is used + --token='' + Bearer token for authentication to the API server + --user='' + The name of the kubeconfig user to use + --username='' + Username for basic authentication to the API server + --warnings-as-errors=false + Treat warnings received from the server as errors and exit with a non-zero exit code +``` + diff --git a/docs/_includes/reference/cli/werf_kubectl_create_secret_generic.short.md b/docs/_includes/reference/cli/werf_kubectl_create_secret_generic.short.md new file mode 100644 index 0000000000..96fea3ac0a --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_create_secret_generic.short.md @@ -0,0 +1 @@ +create a secret from a local file, directory, or literal value \ No newline at end of file diff --git a/docs/_includes/reference/cli/werf_kubectl_create_secret_tls.md b/docs/_includes/reference/cli/werf_kubectl_create_secret_tls.md new file mode 100644 index 0000000000..aaf51abe39 --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_create_secret_tls.md @@ -0,0 +1,114 @@ +{% if include.header %} +{% assign header = include.header %} +{% else %} +{% assign header = "###" %} +{% endif %} +Create a TLS secret from the given public/private key pair. + + The public/private key pair must exist beforehand. The public key certificate must be .PEM encoded and match the given private key. + +{{ header }} Syntax + +```shell +werf kubectl create secret tls NAME --cert=path/to/cert/file --key=path/to/key/file [--dry-run=server|client|none] [options] +``` + +{{ header }} Examples + +```shell + # Create a new TLS secret named tls-secret with the given key pair + kubectl create secret tls tls-secret --cert=path/to/tls.cert --key=path/to/tls.key +``` + +{{ header }} Options + +```shell + --allow-missing-template-keys=true + If true, ignore any errors in templates when a field or map key is missing in the + template. Only applies to golang and jsonpath output formats. + --append-hash=false + Append a hash of the secret to its name. + --cert='' + Path to PEM encoded public key certificate. + --dry-run='none' + Must be "none", "server", or "client". If client strategy, only print the object that + would be sent, without sending it. If server strategy, submit server-side request + without persisting the resource. + --field-manager='kubectl-create' + Name of the manager used to track field ownership. + --key='' + Path to private key associated with given certificate. + -o, --output='' + Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile + |jsonpath|jsonpath-as-json|jsonpath-file. + --save-config=false + If true, the configuration of current object will be saved in its annotation. + Otherwise, the annotation will be unchanged. This flag is useful when you want to + perform kubectl apply on this object in the future. + --show-managed-fields=false + If true, keep the managedFields when printing objects in JSON or YAML format. + --template='' + Template string or path to template file to use when -o=go-template, + -o=go-template-file. The template format is golang templates + [http://golang.org/pkg/text/template/#pkg-overview]. + --validate=true + If true, use a schema to validate the input before sending it +``` + +{{ header }} Options inherited from parent commands + +```shell + --as='' + Username to impersonate for the operation. User could be a regular user or a service + account in a namespace. + --as-group=[] + Group to impersonate for the operation, this flag can be repeated to specify multiple + groups. + --as-uid='' + UID to impersonate for the operation. + --cache-dir='~/.kube/cache' + Default cache directory + --certificate-authority='' + Path to a cert file for the certificate authority + --client-certificate='' + Path to a client certificate file for TLS + --client-key='' + Path to a client key file for TLS + --cluster='' + The name of the kubeconfig cluster to use + --context='' + The name of the kubeconfig context to use + --insecure-skip-tls-verify=false + If true, the server`s certificate will not be checked for validity. This will make your + HTTPS connections insecure + --kubeconfig='' + Path to the kubeconfig file to use for CLI requests. + --match-server-version=false + Require server version to match client version + -n, --namespace='' + If present, the namespace scope for this CLI request + --password='' + Password for basic authentication to the API server + --profile='none' + Name of profile to capture. One of (none|cpu|heap|goroutine|threadcreate|block|mutex) + --profile-output='profile.pprof' + Name of the file to write the profile to + --request-timeout='0' + The length of time to wait before giving up on a single server request. Non-zero values + should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don`t + timeout requests. + -s, --server='' + The address and port of the Kubernetes API server + --tls-server-name='' + Server name to use for server certificate validation. If it is not provided, the + hostname used to contact the server is used + --token='' + Bearer token for authentication to the API server + --user='' + The name of the kubeconfig user to use + --username='' + Username for basic authentication to the API server + --warnings-as-errors=false + Treat warnings received from the server as errors and exit with a non-zero exit code +``` + diff --git a/docs/_includes/reference/cli/werf_kubectl_create_secret_tls.short.md b/docs/_includes/reference/cli/werf_kubectl_create_secret_tls.short.md new file mode 100644 index 0000000000..b378d877ad --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_create_secret_tls.short.md @@ -0,0 +1 @@ +create a TLS secret \ No newline at end of file diff --git a/docs/_includes/reference/cli/werf_kubectl_create_service.md b/docs/_includes/reference/cli/werf_kubectl_create_service.md new file mode 100644 index 0000000000..34bb3ae38d --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_create_service.md @@ -0,0 +1,70 @@ +{% if include.header %} +{% assign header = include.header %} +{% else %} +{% assign header = "###" %} +{% endif %} +Create a service using a specified subcommand. + +{{ header }} Syntax + +```shell +werf kubectl create service +``` + +{{ header }} Options inherited from parent commands + +```shell + --as='' + Username to impersonate for the operation. User could be a regular user or a service + account in a namespace. + --as-group=[] + Group to impersonate for the operation, this flag can be repeated to specify multiple + groups. + --as-uid='' + UID to impersonate for the operation. + --cache-dir='~/.kube/cache' + Default cache directory + --certificate-authority='' + Path to a cert file for the certificate authority + --client-certificate='' + Path to a client certificate file for TLS + --client-key='' + Path to a client key file for TLS + --cluster='' + The name of the kubeconfig cluster to use + --context='' + The name of the kubeconfig context to use + --insecure-skip-tls-verify=false + If true, the server`s certificate will not be checked for validity. This will make your + HTTPS connections insecure + --kubeconfig='' + Path to the kubeconfig file to use for CLI requests. + --match-server-version=false + Require server version to match client version + -n, --namespace='' + If present, the namespace scope for this CLI request + --password='' + Password for basic authentication to the API server + --profile='none' + Name of profile to capture. One of (none|cpu|heap|goroutine|threadcreate|block|mutex) + --profile-output='profile.pprof' + Name of the file to write the profile to + --request-timeout='0' + The length of time to wait before giving up on a single server request. Non-zero values + should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don`t + timeout requests. + -s, --server='' + The address and port of the Kubernetes API server + --tls-server-name='' + Server name to use for server certificate validation. If it is not provided, the + hostname used to contact the server is used + --token='' + Bearer token for authentication to the API server + --user='' + The name of the kubeconfig user to use + --username='' + Username for basic authentication to the API server + --warnings-as-errors=false + Treat warnings received from the server as errors and exit with a non-zero exit code +``` + diff --git a/docs/_includes/reference/cli/werf_kubectl_create_service.short.md b/docs/_includes/reference/cli/werf_kubectl_create_service.short.md new file mode 100644 index 0000000000..0c983fbc8c --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_create_service.short.md @@ -0,0 +1 @@ +create a service using a specified subcommand \ No newline at end of file diff --git a/docs/_includes/reference/cli/werf_kubectl_create_service_clusterip.md b/docs/_includes/reference/cli/werf_kubectl_create_service_clusterip.md new file mode 100644 index 0000000000..4c173c41fd --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_create_service_clusterip.md @@ -0,0 +1,113 @@ +{% if include.header %} +{% assign header = include.header %} +{% else %} +{% assign header = "###" %} +{% endif %} +Create a ClusterIP service with the specified name. + +{{ header }} Syntax + +```shell +werf kubectl create service clusterip NAME [--tcp=:] [--dry-run=server|client|none] [options] +``` + +{{ header }} Examples + +```shell + # Create a new ClusterIP service named my-cs + kubectl create service clusterip my-cs --tcp=5678:8080 + + # Create a new ClusterIP service named my-cs (in headless mode) + kubectl create service clusterip my-cs --clusterip="None" +``` + +{{ header }} Options + +```shell + --allow-missing-template-keys=true + If true, ignore any errors in templates when a field or map key is missing in the + template. Only applies to golang and jsonpath output formats. + --clusterip='' + Assign your own ClusterIP or set to `None` for a `headless` service (no loadbalancing). + --dry-run='none' + Must be "none", "server", or "client". If client strategy, only print the object that + would be sent, without sending it. If server strategy, submit server-side request + without persisting the resource. + --field-manager='kubectl-create' + Name of the manager used to track field ownership. + -o, --output='' + Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile + |jsonpath|jsonpath-as-json|jsonpath-file. + --save-config=false + If true, the configuration of current object will be saved in its annotation. + Otherwise, the annotation will be unchanged. This flag is useful when you want to + perform kubectl apply on this object in the future. + --show-managed-fields=false + If true, keep the managedFields when printing objects in JSON or YAML format. + --tcp=[] + Port pairs can be specified as `:`. + --template='' + Template string or path to template file to use when -o=go-template, + -o=go-template-file. The template format is golang templates + [http://golang.org/pkg/text/template/#pkg-overview]. + --validate=true + If true, use a schema to validate the input before sending it +``` + +{{ header }} Options inherited from parent commands + +```shell + --as='' + Username to impersonate for the operation. User could be a regular user or a service + account in a namespace. + --as-group=[] + Group to impersonate for the operation, this flag can be repeated to specify multiple + groups. + --as-uid='' + UID to impersonate for the operation. + --cache-dir='~/.kube/cache' + Default cache directory + --certificate-authority='' + Path to a cert file for the certificate authority + --client-certificate='' + Path to a client certificate file for TLS + --client-key='' + Path to a client key file for TLS + --cluster='' + The name of the kubeconfig cluster to use + --context='' + The name of the kubeconfig context to use + --insecure-skip-tls-verify=false + If true, the server`s certificate will not be checked for validity. This will make your + HTTPS connections insecure + --kubeconfig='' + Path to the kubeconfig file to use for CLI requests. + --match-server-version=false + Require server version to match client version + -n, --namespace='' + If present, the namespace scope for this CLI request + --password='' + Password for basic authentication to the API server + --profile='none' + Name of profile to capture. One of (none|cpu|heap|goroutine|threadcreate|block|mutex) + --profile-output='profile.pprof' + Name of the file to write the profile to + --request-timeout='0' + The length of time to wait before giving up on a single server request. Non-zero values + should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don`t + timeout requests. + -s, --server='' + The address and port of the Kubernetes API server + --tls-server-name='' + Server name to use for server certificate validation. If it is not provided, the + hostname used to contact the server is used + --token='' + Bearer token for authentication to the API server + --user='' + The name of the kubeconfig user to use + --username='' + Username for basic authentication to the API server + --warnings-as-errors=false + Treat warnings received from the server as errors and exit with a non-zero exit code +``` + diff --git a/docs/_includes/reference/cli/werf_kubectl_create_service_clusterip.short.md b/docs/_includes/reference/cli/werf_kubectl_create_service_clusterip.short.md new file mode 100644 index 0000000000..291258c90f --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_create_service_clusterip.short.md @@ -0,0 +1 @@ +create a ClusterIP service \ No newline at end of file diff --git a/docs/_includes/reference/cli/werf_kubectl_create_service_externalname.md b/docs/_includes/reference/cli/werf_kubectl_create_service_externalname.md new file mode 100644 index 0000000000..e6b2157058 --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_create_service_externalname.md @@ -0,0 +1,112 @@ +{% if include.header %} +{% assign header = include.header %} +{% else %} +{% assign header = "###" %} +{% endif %} +Create an ExternalName service with the specified name. + + ExternalName service references to an external DNS address instead of only pods, which will allow application authors to reference services that exist off platform, on other clusters, or locally. + +{{ header }} Syntax + +```shell +werf kubectl create service externalname NAME --external-name external.name [--dry-run=server|client|none] [options] +``` + +{{ header }} Examples + +```shell + # Create a new ExternalName service named my-ns + kubectl create service externalname my-ns --external-name bar.com +``` + +{{ header }} Options + +```shell + --allow-missing-template-keys=true + If true, ignore any errors in templates when a field or map key is missing in the + template. Only applies to golang and jsonpath output formats. + --dry-run='none' + Must be "none", "server", or "client". If client strategy, only print the object that + would be sent, without sending it. If server strategy, submit server-side request + without persisting the resource. + --external-name='' + External name of service + --field-manager='kubectl-create' + Name of the manager used to track field ownership. + -o, --output='' + Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile + |jsonpath|jsonpath-as-json|jsonpath-file. + --save-config=false + If true, the configuration of current object will be saved in its annotation. + Otherwise, the annotation will be unchanged. This flag is useful when you want to + perform kubectl apply on this object in the future. + --show-managed-fields=false + If true, keep the managedFields when printing objects in JSON or YAML format. + --tcp=[] + Port pairs can be specified as `:`. + --template='' + Template string or path to template file to use when -o=go-template, + -o=go-template-file. The template format is golang templates + [http://golang.org/pkg/text/template/#pkg-overview]. + --validate=true + If true, use a schema to validate the input before sending it +``` + +{{ header }} Options inherited from parent commands + +```shell + --as='' + Username to impersonate for the operation. User could be a regular user or a service + account in a namespace. + --as-group=[] + Group to impersonate for the operation, this flag can be repeated to specify multiple + groups. + --as-uid='' + UID to impersonate for the operation. + --cache-dir='~/.kube/cache' + Default cache directory + --certificate-authority='' + Path to a cert file for the certificate authority + --client-certificate='' + Path to a client certificate file for TLS + --client-key='' + Path to a client key file for TLS + --cluster='' + The name of the kubeconfig cluster to use + --context='' + The name of the kubeconfig context to use + --insecure-skip-tls-verify=false + If true, the server`s certificate will not be checked for validity. This will make your + HTTPS connections insecure + --kubeconfig='' + Path to the kubeconfig file to use for CLI requests. + --match-server-version=false + Require server version to match client version + -n, --namespace='' + If present, the namespace scope for this CLI request + --password='' + Password for basic authentication to the API server + --profile='none' + Name of profile to capture. One of (none|cpu|heap|goroutine|threadcreate|block|mutex) + --profile-output='profile.pprof' + Name of the file to write the profile to + --request-timeout='0' + The length of time to wait before giving up on a single server request. Non-zero values + should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don`t + timeout requests. + -s, --server='' + The address and port of the Kubernetes API server + --tls-server-name='' + Server name to use for server certificate validation. If it is not provided, the + hostname used to contact the server is used + --token='' + Bearer token for authentication to the API server + --user='' + The name of the kubeconfig user to use + --username='' + Username for basic authentication to the API server + --warnings-as-errors=false + Treat warnings received from the server as errors and exit with a non-zero exit code +``` + diff --git a/docs/_includes/reference/cli/werf_kubectl_create_service_externalname.short.md b/docs/_includes/reference/cli/werf_kubectl_create_service_externalname.short.md new file mode 100644 index 0000000000..f6301fee0a --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_create_service_externalname.short.md @@ -0,0 +1 @@ +create an ExternalName service \ No newline at end of file diff --git a/docs/_includes/reference/cli/werf_kubectl_create_service_loadbalancer.md b/docs/_includes/reference/cli/werf_kubectl_create_service_loadbalancer.md new file mode 100644 index 0000000000..05fc5c2926 --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_create_service_loadbalancer.md @@ -0,0 +1,108 @@ +{% if include.header %} +{% assign header = include.header %} +{% else %} +{% assign header = "###" %} +{% endif %} +Create a LoadBalancer service with the specified name. + +{{ header }} Syntax + +```shell +werf kubectl create service loadbalancer NAME [--tcp=port:targetPort] [--dry-run=server|client|none] [options] +``` + +{{ header }} Examples + +```shell + # Create a new LoadBalancer service named my-lbs + kubectl create service loadbalancer my-lbs --tcp=5678:8080 +``` + +{{ header }} Options + +```shell + --allow-missing-template-keys=true + If true, ignore any errors in templates when a field or map key is missing in the + template. Only applies to golang and jsonpath output formats. + --dry-run='none' + Must be "none", "server", or "client". If client strategy, only print the object that + would be sent, without sending it. If server strategy, submit server-side request + without persisting the resource. + --field-manager='kubectl-create' + Name of the manager used to track field ownership. + -o, --output='' + Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile + |jsonpath|jsonpath-as-json|jsonpath-file. + --save-config=false + If true, the configuration of current object will be saved in its annotation. + Otherwise, the annotation will be unchanged. This flag is useful when you want to + perform kubectl apply on this object in the future. + --show-managed-fields=false + If true, keep the managedFields when printing objects in JSON or YAML format. + --tcp=[] + Port pairs can be specified as `:`. + --template='' + Template string or path to template file to use when -o=go-template, + -o=go-template-file. The template format is golang templates + [http://golang.org/pkg/text/template/#pkg-overview]. + --validate=true + If true, use a schema to validate the input before sending it +``` + +{{ header }} Options inherited from parent commands + +```shell + --as='' + Username to impersonate for the operation. User could be a regular user or a service + account in a namespace. + --as-group=[] + Group to impersonate for the operation, this flag can be repeated to specify multiple + groups. + --as-uid='' + UID to impersonate for the operation. + --cache-dir='~/.kube/cache' + Default cache directory + --certificate-authority='' + Path to a cert file for the certificate authority + --client-certificate='' + Path to a client certificate file for TLS + --client-key='' + Path to a client key file for TLS + --cluster='' + The name of the kubeconfig cluster to use + --context='' + The name of the kubeconfig context to use + --insecure-skip-tls-verify=false + If true, the server`s certificate will not be checked for validity. This will make your + HTTPS connections insecure + --kubeconfig='' + Path to the kubeconfig file to use for CLI requests. + --match-server-version=false + Require server version to match client version + -n, --namespace='' + If present, the namespace scope for this CLI request + --password='' + Password for basic authentication to the API server + --profile='none' + Name of profile to capture. One of (none|cpu|heap|goroutine|threadcreate|block|mutex) + --profile-output='profile.pprof' + Name of the file to write the profile to + --request-timeout='0' + The length of time to wait before giving up on a single server request. Non-zero values + should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don`t + timeout requests. + -s, --server='' + The address and port of the Kubernetes API server + --tls-server-name='' + Server name to use for server certificate validation. If it is not provided, the + hostname used to contact the server is used + --token='' + Bearer token for authentication to the API server + --user='' + The name of the kubeconfig user to use + --username='' + Username for basic authentication to the API server + --warnings-as-errors=false + Treat warnings received from the server as errors and exit with a non-zero exit code +``` + diff --git a/docs/_includes/reference/cli/werf_kubectl_create_service_loadbalancer.short.md b/docs/_includes/reference/cli/werf_kubectl_create_service_loadbalancer.short.md new file mode 100644 index 0000000000..d78b244ff4 --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_create_service_loadbalancer.short.md @@ -0,0 +1 @@ +create a LoadBalancer service \ No newline at end of file diff --git a/docs/_includes/reference/cli/werf_kubectl_create_service_nodeport.md b/docs/_includes/reference/cli/werf_kubectl_create_service_nodeport.md new file mode 100644 index 0000000000..37b95a5463 --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_create_service_nodeport.md @@ -0,0 +1,110 @@ +{% if include.header %} +{% assign header = include.header %} +{% else %} +{% assign header = "###" %} +{% endif %} +Create a NodePort service with the specified name. + +{{ header }} Syntax + +```shell +werf kubectl create service nodeport NAME [--tcp=port:targetPort] [--dry-run=server|client|none] [options] +``` + +{{ header }} Examples + +```shell + # Create a new NodePort service named my-ns + kubectl create service nodeport my-ns --tcp=5678:8080 +``` + +{{ header }} Options + +```shell + --allow-missing-template-keys=true + If true, ignore any errors in templates when a field or map key is missing in the + template. Only applies to golang and jsonpath output formats. + --dry-run='none' + Must be "none", "server", or "client". If client strategy, only print the object that + would be sent, without sending it. If server strategy, submit server-side request + without persisting the resource. + --field-manager='kubectl-create' + Name of the manager used to track field ownership. + --node-port=0 + Port used to expose the service on each node in a cluster. + -o, --output='' + Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile + |jsonpath|jsonpath-as-json|jsonpath-file. + --save-config=false + If true, the configuration of current object will be saved in its annotation. + Otherwise, the annotation will be unchanged. This flag is useful when you want to + perform kubectl apply on this object in the future. + --show-managed-fields=false + If true, keep the managedFields when printing objects in JSON or YAML format. + --tcp=[] + Port pairs can be specified as `:`. + --template='' + Template string or path to template file to use when -o=go-template, + -o=go-template-file. The template format is golang templates + [http://golang.org/pkg/text/template/#pkg-overview]. + --validate=true + If true, use a schema to validate the input before sending it +``` + +{{ header }} Options inherited from parent commands + +```shell + --as='' + Username to impersonate for the operation. User could be a regular user or a service + account in a namespace. + --as-group=[] + Group to impersonate for the operation, this flag can be repeated to specify multiple + groups. + --as-uid='' + UID to impersonate for the operation. + --cache-dir='~/.kube/cache' + Default cache directory + --certificate-authority='' + Path to a cert file for the certificate authority + --client-certificate='' + Path to a client certificate file for TLS + --client-key='' + Path to a client key file for TLS + --cluster='' + The name of the kubeconfig cluster to use + --context='' + The name of the kubeconfig context to use + --insecure-skip-tls-verify=false + If true, the server`s certificate will not be checked for validity. This will make your + HTTPS connections insecure + --kubeconfig='' + Path to the kubeconfig file to use for CLI requests. + --match-server-version=false + Require server version to match client version + -n, --namespace='' + If present, the namespace scope for this CLI request + --password='' + Password for basic authentication to the API server + --profile='none' + Name of profile to capture. One of (none|cpu|heap|goroutine|threadcreate|block|mutex) + --profile-output='profile.pprof' + Name of the file to write the profile to + --request-timeout='0' + The length of time to wait before giving up on a single server request. Non-zero values + should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don`t + timeout requests. + -s, --server='' + The address and port of the Kubernetes API server + --tls-server-name='' + Server name to use for server certificate validation. If it is not provided, the + hostname used to contact the server is used + --token='' + Bearer token for authentication to the API server + --user='' + The name of the kubeconfig user to use + --username='' + Username for basic authentication to the API server + --warnings-as-errors=false + Treat warnings received from the server as errors and exit with a non-zero exit code +``` + diff --git a/docs/_includes/reference/cli/werf_kubectl_create_service_nodeport.short.md b/docs/_includes/reference/cli/werf_kubectl_create_service_nodeport.short.md new file mode 100644 index 0000000000..995405334f --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_create_service_nodeport.short.md @@ -0,0 +1 @@ +create a NodePort service \ No newline at end of file diff --git a/docs/_includes/reference/cli/werf_kubectl_create_serviceaccount.md b/docs/_includes/reference/cli/werf_kubectl_create_serviceaccount.md new file mode 100644 index 0000000000..5de9aa0f25 --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_create_serviceaccount.md @@ -0,0 +1,106 @@ +{% if include.header %} +{% assign header = include.header %} +{% else %} +{% assign header = "###" %} +{% endif %} +Create a service account with the specified name. + +{{ header }} Syntax + +```shell +werf kubectl create serviceaccount NAME [--dry-run=server|client|none] [options] +``` + +{{ header }} Examples + +```shell + # Create a new service account named my-service-account + kubectl create serviceaccount my-service-account +``` + +{{ header }} Options + +```shell + --allow-missing-template-keys=true + If true, ignore any errors in templates when a field or map key is missing in the + template. Only applies to golang and jsonpath output formats. + --dry-run='none' + Must be "none", "server", or "client". If client strategy, only print the object that + would be sent, without sending it. If server strategy, submit server-side request + without persisting the resource. + --field-manager='kubectl-create' + Name of the manager used to track field ownership. + -o, --output='' + Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile + |jsonpath|jsonpath-as-json|jsonpath-file. + --save-config=false + If true, the configuration of current object will be saved in its annotation. + Otherwise, the annotation will be unchanged. This flag is useful when you want to + perform kubectl apply on this object in the future. + --show-managed-fields=false + If true, keep the managedFields when printing objects in JSON or YAML format. + --template='' + Template string or path to template file to use when -o=go-template, + -o=go-template-file. The template format is golang templates + [http://golang.org/pkg/text/template/#pkg-overview]. + --validate=true + If true, use a schema to validate the input before sending it +``` + +{{ header }} Options inherited from parent commands + +```shell + --as='' + Username to impersonate for the operation. User could be a regular user or a service + account in a namespace. + --as-group=[] + Group to impersonate for the operation, this flag can be repeated to specify multiple + groups. + --as-uid='' + UID to impersonate for the operation. + --cache-dir='~/.kube/cache' + Default cache directory + --certificate-authority='' + Path to a cert file for the certificate authority + --client-certificate='' + Path to a client certificate file for TLS + --client-key='' + Path to a client key file for TLS + --cluster='' + The name of the kubeconfig cluster to use + --context='' + The name of the kubeconfig context to use + --insecure-skip-tls-verify=false + If true, the server`s certificate will not be checked for validity. This will make your + HTTPS connections insecure + --kubeconfig='' + Path to the kubeconfig file to use for CLI requests. + --match-server-version=false + Require server version to match client version + -n, --namespace='' + If present, the namespace scope for this CLI request + --password='' + Password for basic authentication to the API server + --profile='none' + Name of profile to capture. One of (none|cpu|heap|goroutine|threadcreate|block|mutex) + --profile-output='profile.pprof' + Name of the file to write the profile to + --request-timeout='0' + The length of time to wait before giving up on a single server request. Non-zero values + should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don`t + timeout requests. + -s, --server='' + The address and port of the Kubernetes API server + --tls-server-name='' + Server name to use for server certificate validation. If it is not provided, the + hostname used to contact the server is used + --token='' + Bearer token for authentication to the API server + --user='' + The name of the kubeconfig user to use + --username='' + Username for basic authentication to the API server + --warnings-as-errors=false + Treat warnings received from the server as errors and exit with a non-zero exit code +``` + diff --git a/docs/_includes/reference/cli/werf_kubectl_create_serviceaccount.short.md b/docs/_includes/reference/cli/werf_kubectl_create_serviceaccount.short.md new file mode 100644 index 0000000000..e4a6c3ea6b --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_create_serviceaccount.short.md @@ -0,0 +1 @@ +create a service account with the specified name \ No newline at end of file diff --git a/docs/_includes/reference/cli/werf_kubectl_debug.md b/docs/_includes/reference/cli/werf_kubectl_debug.md new file mode 100644 index 0000000000..7641e048d0 --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_debug.md @@ -0,0 +1,146 @@ +{% if include.header %} +{% assign header = include.header %} +{% else %} +{% assign header = "###" %} +{% endif %} +Debug cluster resources using interactive debugging containers. + + 'debug' provides automation for common debugging tasks for cluster objects identified by resource and name. Pods will be used by default if no resource is specified. + + The action taken by 'debug' varies depending on what resource is specified. Supported actions include: + + * Workload: Create a copy of an existing pod with certain attributes changed, for example changing the image tag to a new version. + * Workload: Add an ephemeral container to an already running pod, for example to add debugging utilities without restarting the pod. + * Node: Create a new pod that runs in the node's host namespaces and can access the node's filesystem. + +{{ header }} Syntax + +```shell +werf kubectl debug (POD | TYPE[[.VERSION].GROUP]/NAME) [ -- COMMAND [args...] ] [options] +``` + +{{ header }} Examples + +```shell + # Create an interactive debugging session in pod mypod and immediately attach to it. + # (requires the EphemeralContainers feature to be enabled in the cluster) + kubectl debug mypod -it --image=busybox + + # Create a debug container named debugger using a custom automated debugging image. + # (requires the EphemeralContainers feature to be enabled in the cluster) + kubectl debug --image=myproj/debug-tools -c debugger mypod + + # Create a copy of mypod adding a debug container and attach to it + kubectl debug mypod -it --image=busybox --copy-to=my-debugger + + # Create a copy of mypod changing the command of mycontainer + kubectl debug mypod -it --copy-to=my-debugger --container=mycontainer -- sh + + # Create a copy of mypod changing all container images to busybox + kubectl debug mypod --copy-to=my-debugger --set-image=*=busybox + + # Create a copy of mypod adding a debug container and changing container images + kubectl debug mypod -it --copy-to=my-debugger --image=debian --set-image=app=app:debug,sidecar=sidecar:debug + + # Create an interactive debugging session on a node and immediately attach to it. + # The container will run in the host namespaces and the host's filesystem will be mounted at /host + kubectl debug node/mynode -it --image=busybox +``` + +{{ header }} Options + +```shell + --arguments-only=false + If specified, everything after -- will be passed to the new container as Args instead + of Command. + --attach=false + If true, wait for the container to start running, and then attach as if `kubectl attach + ...` were called. Default false, unless `-i/--stdin` is set, in which case the default + is true. + -c, --container='' + Container name to use for debug container. + --copy-to='' + Create a copy of the target Pod with this name. + --env=[] + Environment variables to set in the container. + --image='' + Container image to use for debug container. + --image-pull-policy='' + The image pull policy for the container. If left empty, this value will not be + specified by the client and defaulted by the server. + -q, --quiet=false + If true, suppress informational messages. + --replace=false + When used with `--copy-to`, delete the original Pod. + --same-node=false + When used with `--copy-to`, schedule the copy of target Pod on the same node. + --set-image=[] + When used with `--copy-to`, a list of name=image pairs for changing container images, + similar to how `kubectl set image` works. + --share-processes=true + When used with `--copy-to`, enable process namespace sharing in the copy. + -i, --stdin=false + Keep stdin open on the container(s) in the pod, even if nothing is attached. + --target='' + When using an ephemeral container, target processes in this container name. + -t, --tty=false + Allocate a TTY for the debugging container. +``` + +{{ header }} Options inherited from parent commands + +```shell + --as='' + Username to impersonate for the operation. User could be a regular user or a service + account in a namespace. + --as-group=[] + Group to impersonate for the operation, this flag can be repeated to specify multiple + groups. + --as-uid='' + UID to impersonate for the operation. + --cache-dir='~/.kube/cache' + Default cache directory + --certificate-authority='' + Path to a cert file for the certificate authority + --client-certificate='' + Path to a client certificate file for TLS + --client-key='' + Path to a client key file for TLS + --cluster='' + The name of the kubeconfig cluster to use + --context='' + The name of the kubeconfig context to use + --insecure-skip-tls-verify=false + If true, the server`s certificate will not be checked for validity. This will make your + HTTPS connections insecure + --kubeconfig='' + Path to the kubeconfig file to use for CLI requests. + --match-server-version=false + Require server version to match client version + -n, --namespace='' + If present, the namespace scope for this CLI request + --password='' + Password for basic authentication to the API server + --profile='none' + Name of profile to capture. One of (none|cpu|heap|goroutine|threadcreate|block|mutex) + --profile-output='profile.pprof' + Name of the file to write the profile to + --request-timeout='0' + The length of time to wait before giving up on a single server request. Non-zero values + should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don`t + timeout requests. + -s, --server='' + The address and port of the Kubernetes API server + --tls-server-name='' + Server name to use for server certificate validation. If it is not provided, the + hostname used to contact the server is used + --token='' + Bearer token for authentication to the API server + --user='' + The name of the kubeconfig user to use + --username='' + Username for basic authentication to the API server + --warnings-as-errors=false + Treat warnings received from the server as errors and exit with a non-zero exit code +``` + diff --git a/docs/_includes/reference/cli/werf_kubectl_debug.short.md b/docs/_includes/reference/cli/werf_kubectl_debug.short.md new file mode 100644 index 0000000000..d1f328e958 --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_debug.short.md @@ -0,0 +1 @@ +create debugging sessions for troubleshooting workloads and nodes \ No newline at end of file diff --git a/docs/_includes/reference/cli/werf_kubectl_delete.md b/docs/_includes/reference/cli/werf_kubectl_delete.md new file mode 100644 index 0000000000..7f45cd2ad7 --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_delete.md @@ -0,0 +1,159 @@ +{% if include.header %} +{% assign header = include.header %} +{% else %} +{% assign header = "###" %} +{% endif %} +Delete resources by file names, stdin, resources and names, or by resources and label selector. + + JSON and YAML formats are accepted. Only one type of argument may be specified: file names, resources and names, or resources and label selector. + + Some resources, such as pods, support graceful deletion. These resources define a default period before they are forcibly terminated (the grace period) but you may override that value with the --grace-period flag, or pass --now to set a grace-period of 1. Because these resources often represent entities in the cluster, deletion may not be acknowledged immediately. If the node hosting a pod is down or cannot reach the API server, termination may take significantly longer than the grace period. To force delete a resource, you must specify the --force flag. Note: only a subset of resources support graceful deletion. In absence of the support, the --grace-period flag is ignored. + + IMPORTANT: Force deleting pods does not wait for confirmation that the pod's processes have been terminated, which can leave those processes running until the node detects the deletion and completes graceful deletion. If your processes use shared storage or talk to a remote API and depend on the name of the pod to identify themselves, force deleting those pods may result in multiple processes running on different machines using the same identification which may lead to data corruption or inconsistency. Only force delete pods when you are sure the pod is terminated, or if your application can tolerate multiple copies of the same pod running at once. Also, if you force delete pods, the scheduler may place new pods on those nodes before the node has released those resources and causing those pods to be evicted immediately. + + Note that the delete command does NOT do resource version checks, so if someone submits an update to a resource right when you submit a delete, their update will be lost along with the rest of the resource. + +{{ header }} Syntax + +```shell +werf kubectl delete ([-f FILENAME] | [-k DIRECTORY] | TYPE [(NAME | -l label | --all)]) [options] +``` + +{{ header }} Examples + +```shell + # Delete a pod using the type and name specified in pod.json + kubectl delete -f ./pod.json + + # Delete resources from a directory containing kustomization.yaml - e.g. dir/kustomization.yaml + kubectl delete -k dir + + # Delete a pod based on the type and name in the JSON passed into stdin + cat pod.json | kubectl delete -f - + + # Delete pods and services with same names "baz" and "foo" + kubectl delete pod,service baz foo + + # Delete pods and services with label name=myLabel + kubectl delete pods,services -l name=myLabel + + # Delete a pod with minimal delay + kubectl delete pod foo --now + + # Force delete a pod on a dead node + kubectl delete pod foo --force + + # Delete all pods + kubectl delete pods --all +``` + +{{ header }} Options + +```shell + --all=false + Delete all resources, in the namespace of the specified resource types. + -A, --all-namespaces=false + If present, list the requested object(s) across all namespaces. Namespace in current + context is ignored even if specified with --namespace. + --cascade='background' + Must be "background", "orphan", or "foreground". Selects the deletion cascading + strategy for the dependents (e.g. Pods created by a ReplicationController). Defaults to + background. + --dry-run='none' + Must be "none", "server", or "client". If client strategy, only print the object that + would be sent, without sending it. If server strategy, submit server-side request + without persisting the resource. + --field-selector='' + Selector (field query) to filter on, supports `=`, `==`, and `!=`.(e.g. + --field-selector key1=value1,key2=value2). The server only supports a limited number of + field queries per type. + -f, --filename=[] + containing the resource to delete. + --force=false + If true, immediately remove resources from API and bypass graceful deletion. Note that + immediate deletion of some resources may result in inconsistency or data loss and + requires confirmation. + --grace-period=-1 + Period of time in seconds given to the resource to terminate gracefully. Ignored if + negative. Set to 1 for immediate shutdown. Can only be set to 0 when --force is true + (force deletion). + --ignore-not-found=false + Treat "resource not found" as a successful delete. Defaults to "true" when --all is + specified. + -k, --kustomize='' + Process a kustomization directory. This flag can`t be used together with -f or -R. + --now=false + If true, resources are signaled for immediate shutdown (same as --grace-period=1). + -o, --output='' + Output mode. Use "-o name" for shorter output (resource/name). + --raw='' + Raw URI to DELETE to the server. Uses the transport specified by the kubeconfig file. + -R, --recursive=false + Process the directory used in -f, --filename recursively. Useful when you want to + manage related manifests organized within the same directory. + -l, --selector='' + Selector (label query) to filter on. + --timeout=0s + The length of time to wait before giving up on a delete, zero means determine a timeout + from the size of the object + --wait=true + If true, wait for resources to be gone before returning. This waits for finalizers. +``` + +{{ header }} Options inherited from parent commands + +```shell + --as='' + Username to impersonate for the operation. User could be a regular user or a service + account in a namespace. + --as-group=[] + Group to impersonate for the operation, this flag can be repeated to specify multiple + groups. + --as-uid='' + UID to impersonate for the operation. + --cache-dir='~/.kube/cache' + Default cache directory + --certificate-authority='' + Path to a cert file for the certificate authority + --client-certificate='' + Path to a client certificate file for TLS + --client-key='' + Path to a client key file for TLS + --cluster='' + The name of the kubeconfig cluster to use + --context='' + The name of the kubeconfig context to use + --insecure-skip-tls-verify=false + If true, the server`s certificate will not be checked for validity. This will make your + HTTPS connections insecure + --kubeconfig='' + Path to the kubeconfig file to use for CLI requests. + --match-server-version=false + Require server version to match client version + -n, --namespace='' + If present, the namespace scope for this CLI request + --password='' + Password for basic authentication to the API server + --profile='none' + Name of profile to capture. One of (none|cpu|heap|goroutine|threadcreate|block|mutex) + --profile-output='profile.pprof' + Name of the file to write the profile to + --request-timeout='0' + The length of time to wait before giving up on a single server request. Non-zero values + should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don`t + timeout requests. + -s, --server='' + The address and port of the Kubernetes API server + --tls-server-name='' + Server name to use for server certificate validation. If it is not provided, the + hostname used to contact the server is used + --token='' + Bearer token for authentication to the API server + --user='' + The name of the kubeconfig user to use + --username='' + Username for basic authentication to the API server + --warnings-as-errors=false + Treat warnings received from the server as errors and exit with a non-zero exit code +``` + diff --git a/docs/_includes/reference/cli/werf_kubectl_delete.short.md b/docs/_includes/reference/cli/werf_kubectl_delete.short.md new file mode 100644 index 0000000000..3b08688204 --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_delete.short.md @@ -0,0 +1 @@ +delete resources by file names, stdin, resources and names, or by resources and label selector \ No newline at end of file diff --git a/docs/_includes/reference/cli/werf_kubectl_describe.md b/docs/_includes/reference/cli/werf_kubectl_describe.md new file mode 100644 index 0000000000..9ad2f66a1e --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_describe.md @@ -0,0 +1,124 @@ +{% if include.header %} +{% assign header = include.header %} +{% else %} +{% assign header = "###" %} +{% endif %} +Show details of a specific resource or group of resources. + + Print a detailed description of the selected resources, including related resources such as events or controllers. You may select a single object by name, all objects of that type, provide a name prefix, or label selector. For example: + + $ kubectl describe TYPE NAME_PREFIX + + will first check for an exact match on TYPE and NAME_PREFIX. If no such resource exists, it will output details for every resource that has a name prefixed with NAME_PREFIX. + +Use "kubectl api-resources" for a complete list of supported resources. + +{{ header }} Syntax + +```shell +werf kubectl describe (-f FILENAME | TYPE [NAME_PREFIX | -l label] | TYPE/NAME) [options] +``` + +{{ header }} Examples + +```shell + # Describe a node + kubectl describe nodes kubernetes-node-emt8.c.myproject.internal + + # Describe a pod + kubectl describe pods/nginx + + # Describe a pod identified by type and name in "pod.json" + kubectl describe -f pod.json + + # Describe all pods + kubectl describe pods + + # Describe pods by label name=myLabel + kubectl describe po -l name=myLabel + + # Describe all pods managed by the 'frontend' replication controller + # (rc-created pods get the name of the rc as a prefix in the pod name) + kubectl describe pods frontend +``` + +{{ header }} Options + +```shell + -A, --all-namespaces=false + If present, list the requested object(s) across all namespaces. Namespace in current + context is ignored even if specified with --namespace. + --chunk-size=500 + Return large lists in chunks rather than all at once. Pass 0 to disable. This flag is + beta and may change in the future. + -f, --filename=[] + Filename, directory, or URL to files containing the resource to describe + -k, --kustomize='' + Process the kustomization directory. This flag can`t be used together with -f or -R. + -R, --recursive=false + Process the directory used in -f, --filename recursively. Useful when you want to + manage related manifests organized within the same directory. + -l, --selector='' + Selector (label query) to filter on, supports `=`, `==`, and `!=`.(e.g. -l + key1=value1,key2=value2) + --show-events=true + If true, display events related to the described object. +``` + +{{ header }} Options inherited from parent commands + +```shell + --as='' + Username to impersonate for the operation. User could be a regular user or a service + account in a namespace. + --as-group=[] + Group to impersonate for the operation, this flag can be repeated to specify multiple + groups. + --as-uid='' + UID to impersonate for the operation. + --cache-dir='~/.kube/cache' + Default cache directory + --certificate-authority='' + Path to a cert file for the certificate authority + --client-certificate='' + Path to a client certificate file for TLS + --client-key='' + Path to a client key file for TLS + --cluster='' + The name of the kubeconfig cluster to use + --context='' + The name of the kubeconfig context to use + --insecure-skip-tls-verify=false + If true, the server`s certificate will not be checked for validity. This will make your + HTTPS connections insecure + --kubeconfig='' + Path to the kubeconfig file to use for CLI requests. + --match-server-version=false + Require server version to match client version + -n, --namespace='' + If present, the namespace scope for this CLI request + --password='' + Password for basic authentication to the API server + --profile='none' + Name of profile to capture. One of (none|cpu|heap|goroutine|threadcreate|block|mutex) + --profile-output='profile.pprof' + Name of the file to write the profile to + --request-timeout='0' + The length of time to wait before giving up on a single server request. Non-zero values + should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don`t + timeout requests. + -s, --server='' + The address and port of the Kubernetes API server + --tls-server-name='' + Server name to use for server certificate validation. If it is not provided, the + hostname used to contact the server is used + --token='' + Bearer token for authentication to the API server + --user='' + The name of the kubeconfig user to use + --username='' + Username for basic authentication to the API server + --warnings-as-errors=false + Treat warnings received from the server as errors and exit with a non-zero exit code +``` + diff --git a/docs/_includes/reference/cli/werf_kubectl_describe.short.md b/docs/_includes/reference/cli/werf_kubectl_describe.short.md new file mode 100644 index 0000000000..7c9d9e8a5b --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_describe.short.md @@ -0,0 +1 @@ +show details of a specific resource or group of resources \ No newline at end of file diff --git a/docs/_includes/reference/cli/werf_kubectl_diff.md b/docs/_includes/reference/cli/werf_kubectl_diff.md new file mode 100644 index 0000000000..130d6e930f --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_diff.md @@ -0,0 +1,111 @@ +{% if include.header %} +{% assign header = include.header %} +{% else %} +{% assign header = "###" %} +{% endif %} +Diff configurations specified by file name or stdin between the current online configuration, and the configuration as it would be if applied. + + The output is always YAML. + + KUBECTL_EXTERNAL_DIFF environment variable can be used to select your own diff command. Users can use external commands with params too, example: KUBECTL_EXTERNAL_DIFF="colordiff -N -u" + + By default, the "diff" command available in your path will be run with the "-u" (unified diff) and "-N" (treat absent files as empty) options. + + Exit status: 0 No differences were found. 1 Differences were found. >1 Kubectl or diff failed with an error. + + Note: KUBECTL_EXTERNAL_DIFF, if used, is expected to follow that convention. + +{{ header }} Syntax + +```shell +werf kubectl diff -f FILENAME [options] +``` + +{{ header }} Examples + +```shell + # Diff resources included in pod.json + kubectl diff -f pod.json + + # Diff file read from stdin + cat service.yaml | kubectl diff -f - +``` + +{{ header }} Options + +```shell + --field-manager='kubectl-client-side-apply' + Name of the manager used to track field ownership. + -f, --filename=[] + Filename, directory, or URL to files contains the configuration to diff + --force-conflicts=false + If true, server-side apply will force the changes against conflicts. + -k, --kustomize='' + Process the kustomization directory. This flag can`t be used together with -f or -R. + -R, --recursive=false + Process the directory used in -f, --filename recursively. Useful when you want to + manage related manifests organized within the same directory. + -l, --selector='' + Selector (label query) to filter on, supports `=`, `==`, and `!=`.(e.g. -l + key1=value1,key2=value2) + --server-side=false + If true, apply runs in the server instead of the client. +``` + +{{ header }} Options inherited from parent commands + +```shell + --as='' + Username to impersonate for the operation. User could be a regular user or a service + account in a namespace. + --as-group=[] + Group to impersonate for the operation, this flag can be repeated to specify multiple + groups. + --as-uid='' + UID to impersonate for the operation. + --cache-dir='~/.kube/cache' + Default cache directory + --certificate-authority='' + Path to a cert file for the certificate authority + --client-certificate='' + Path to a client certificate file for TLS + --client-key='' + Path to a client key file for TLS + --cluster='' + The name of the kubeconfig cluster to use + --context='' + The name of the kubeconfig context to use + --insecure-skip-tls-verify=false + If true, the server`s certificate will not be checked for validity. This will make your + HTTPS connections insecure + --kubeconfig='' + Path to the kubeconfig file to use for CLI requests. + --match-server-version=false + Require server version to match client version + -n, --namespace='' + If present, the namespace scope for this CLI request + --password='' + Password for basic authentication to the API server + --profile='none' + Name of profile to capture. One of (none|cpu|heap|goroutine|threadcreate|block|mutex) + --profile-output='profile.pprof' + Name of the file to write the profile to + --request-timeout='0' + The length of time to wait before giving up on a single server request. Non-zero values + should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don`t + timeout requests. + -s, --server='' + The address and port of the Kubernetes API server + --tls-server-name='' + Server name to use for server certificate validation. If it is not provided, the + hostname used to contact the server is used + --token='' + Bearer token for authentication to the API server + --user='' + The name of the kubeconfig user to use + --username='' + Username for basic authentication to the API server + --warnings-as-errors=false + Treat warnings received from the server as errors and exit with a non-zero exit code +``` + diff --git a/docs/_includes/reference/cli/werf_kubectl_diff.short.md b/docs/_includes/reference/cli/werf_kubectl_diff.short.md new file mode 100644 index 0000000000..73ebe41fc4 --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_diff.short.md @@ -0,0 +1 @@ +diff the live version against a would-be applied version \ No newline at end of file diff --git a/docs/_includes/reference/cli/werf_kubectl_drain.md b/docs/_includes/reference/cli/werf_kubectl_drain.md new file mode 100644 index 0000000000..e31e1193b6 --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_drain.md @@ -0,0 +1,123 @@ +{% if include.header %} +{% assign header = include.header %} +{% else %} +{% assign header = "###" %} +{% endif %} +Drain node in preparation for maintenance. + + The given node will be marked unschedulable to prevent new pods from arriving. 'drain' evicts the pods if the API server supports [https://kubernetes.io/docs/concepts/workloads/pods/disruptions/](https://kubernetes.io/docs/concepts/workloads/pods/disruptions/) . Otherwise, it will use normal DELETE to delete the pods. The 'drain' evicts or deletes all pods except mirror pods (which cannot be deleted through the API server). If there are daemon set-managed pods, drain will not proceed without --ignore-daemonsets, and regardless it will not delete any daemon set-managed pods, because those pods would be immediately replaced by the daemon set controller, which ignores unschedulable markings. If there are any pods that are neither mirror pods nor managed by a replication controller, replica set, daemon set, stateful set, or job, then drain will not delete any pods unless you use --force. --force will also allow deletion to proceed if the managing resource of one or more pods is missing. + + 'drain' waits for graceful termination. You should not operate on the machine until the command completes. + + When you are ready to put the node back into service, use kubectl uncordon, which will make the node schedulable again. + + [https://kubernetes.io/images/docs/kubectl_drain.svg](https://kubernetes.io/images/docs/kubectl_drain.svg) + +{{ header }} Syntax + +```shell +werf kubectl drain NODE [options] +``` + +{{ header }} Examples + +```shell + # Drain node "foo", even if there are pods not managed by a replication controller, replica set, job, daemon set or stateful set on it + kubectl drain foo --force + + # As above, but abort if there are pods not managed by a replication controller, replica set, job, daemon set or stateful set, and use a grace period of 15 minutes + kubectl drain foo --grace-period=900 +``` + +{{ header }} Options + +```shell + --chunk-size=500 + Return large lists in chunks rather than all at once. Pass 0 to disable. This flag is + beta and may change in the future. + --delete-emptydir-data=false + Continue even if there are pods using emptyDir (local data that will be deleted when + the node is drained). + --disable-eviction=false + Force drain to use delete, even if eviction is supported. This will bypass checking + PodDisruptionBudgets, use with caution. + --dry-run='none' + Must be "none", "server", or "client". If client strategy, only print the object that + would be sent, without sending it. If server strategy, submit server-side request + without persisting the resource. + --force=false + Continue even if there are pods not managed by a ReplicationController, ReplicaSet, + Job, DaemonSet or StatefulSet. + --grace-period=-1 + Period of time in seconds given to each pod to terminate gracefully. If negative, the + default value specified in the pod will be used. + --ignore-daemonsets=false + Ignore DaemonSet-managed pods. + --pod-selector='' + Label selector to filter pods on the node + -l, --selector='' + Selector (label query) to filter on + --skip-wait-for-delete-timeout=0 + If pod DeletionTimestamp older than N seconds, skip waiting for the pod. Seconds must + be greater than 0 to skip. + --timeout=0s + The length of time to wait before giving up, zero means infinite +``` + +{{ header }} Options inherited from parent commands + +```shell + --as='' + Username to impersonate for the operation. User could be a regular user or a service + account in a namespace. + --as-group=[] + Group to impersonate for the operation, this flag can be repeated to specify multiple + groups. + --as-uid='' + UID to impersonate for the operation. + --cache-dir='~/.kube/cache' + Default cache directory + --certificate-authority='' + Path to a cert file for the certificate authority + --client-certificate='' + Path to a client certificate file for TLS + --client-key='' + Path to a client key file for TLS + --cluster='' + The name of the kubeconfig cluster to use + --context='' + The name of the kubeconfig context to use + --insecure-skip-tls-verify=false + If true, the server`s certificate will not be checked for validity. This will make your + HTTPS connections insecure + --kubeconfig='' + Path to the kubeconfig file to use for CLI requests. + --match-server-version=false + Require server version to match client version + -n, --namespace='' + If present, the namespace scope for this CLI request + --password='' + Password for basic authentication to the API server + --profile='none' + Name of profile to capture. One of (none|cpu|heap|goroutine|threadcreate|block|mutex) + --profile-output='profile.pprof' + Name of the file to write the profile to + --request-timeout='0' + The length of time to wait before giving up on a single server request. Non-zero values + should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don`t + timeout requests. + -s, --server='' + The address and port of the Kubernetes API server + --tls-server-name='' + Server name to use for server certificate validation. If it is not provided, the + hostname used to contact the server is used + --token='' + Bearer token for authentication to the API server + --user='' + The name of the kubeconfig user to use + --username='' + Username for basic authentication to the API server + --warnings-as-errors=false + Treat warnings received from the server as errors and exit with a non-zero exit code +``` + diff --git a/docs/_includes/reference/cli/werf_kubectl_drain.short.md b/docs/_includes/reference/cli/werf_kubectl_drain.short.md new file mode 100644 index 0000000000..a99a11d0ca --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_drain.short.md @@ -0,0 +1 @@ +drain node in preparation for maintenance \ No newline at end of file diff --git a/docs/_includes/reference/cli/werf_kubectl_edit.md b/docs/_includes/reference/cli/werf_kubectl_edit.md new file mode 100644 index 0000000000..b171aadaf5 --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_edit.md @@ -0,0 +1,132 @@ +{% if include.header %} +{% assign header = include.header %} +{% else %} +{% assign header = "###" %} +{% endif %} +Edit a resource from the default editor. + + The edit command allows you to directly edit any API resource you can retrieve via the command-line tools. It will open the editor defined by your KUBE_EDITOR, or EDITOR environment variables, or fall back to 'vi' for Linux or 'notepad' for Windows. You can edit multiple objects, although changes are applied one at a time. The command accepts file names as well as command-line arguments, although the files you point to must be previously saved versions of resources. + + Editing is done with the API version used to fetch the resource. To edit using a specific API version, fully-qualify the resource, version, and group. + + The default format is YAML. To edit in JSON, specify "-o json". + + The flag --windows-line-endings can be used to force Windows line endings, otherwise the default for your operating system will be used. + + In the event an error occurs while updating, a temporary file will be created on disk that contains your unapplied changes. The most common error when updating a resource is another editor changing the resource on the server. When this occurs, you will have to apply your changes to the newer version of the resource, or update your temporary saved copy to include the latest resource version. + +{{ header }} Syntax + +```shell +werf kubectl edit (RESOURCE/NAME | -f FILENAME) [options] +``` + +{{ header }} Examples + +```shell + # Edit the service named 'docker-registry' + kubectl edit svc/docker-registry + + # Use an alternative editor + KUBE_EDITOR="nano" kubectl edit svc/docker-registry + + # Edit the job 'myjob' in JSON using the v1 API format + kubectl edit job.v1.batch/myjob -o json + + # Edit the deployment 'mydeployment' in YAML and save the modified config in its annotation + kubectl edit deployment/mydeployment -o yaml --save-config +``` + +{{ header }} Options + +```shell + --allow-missing-template-keys=true + If true, ignore any errors in templates when a field or map key is missing in the + template. Only applies to golang and jsonpath output formats. + --field-manager='kubectl-edit' + Name of the manager used to track field ownership. + -f, --filename=[] + Filename, directory, or URL to files to use to edit the resource + -k, --kustomize='' + Process the kustomization directory. This flag can`t be used together with -f or -R. + -o, --output='' + Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile + |jsonpath|jsonpath-as-json|jsonpath-file. + --output-patch=false + Output the patch if the resource is edited. + -R, --recursive=false + Process the directory used in -f, --filename recursively. Useful when you want to + manage related manifests organized within the same directory. + --save-config=false + If true, the configuration of current object will be saved in its annotation. + Otherwise, the annotation will be unchanged. This flag is useful when you want to + perform kubectl apply on this object in the future. + --show-managed-fields=false + If true, keep the managedFields when printing objects in JSON or YAML format. + --template='' + Template string or path to template file to use when -o=go-template, + -o=go-template-file. The template format is golang templates + [http://golang.org/pkg/text/template/#pkg-overview]. + --validate=true + If true, use a schema to validate the input before sending it + --windows-line-endings=false + Defaults to the line ending native to your platform. +``` + +{{ header }} Options inherited from parent commands + +```shell + --as='' + Username to impersonate for the operation. User could be a regular user or a service + account in a namespace. + --as-group=[] + Group to impersonate for the operation, this flag can be repeated to specify multiple + groups. + --as-uid='' + UID to impersonate for the operation. + --cache-dir='~/.kube/cache' + Default cache directory + --certificate-authority='' + Path to a cert file for the certificate authority + --client-certificate='' + Path to a client certificate file for TLS + --client-key='' + Path to a client key file for TLS + --cluster='' + The name of the kubeconfig cluster to use + --context='' + The name of the kubeconfig context to use + --insecure-skip-tls-verify=false + If true, the server`s certificate will not be checked for validity. This will make your + HTTPS connections insecure + --kubeconfig='' + Path to the kubeconfig file to use for CLI requests. + --match-server-version=false + Require server version to match client version + -n, --namespace='' + If present, the namespace scope for this CLI request + --password='' + Password for basic authentication to the API server + --profile='none' + Name of profile to capture. One of (none|cpu|heap|goroutine|threadcreate|block|mutex) + --profile-output='profile.pprof' + Name of the file to write the profile to + --request-timeout='0' + The length of time to wait before giving up on a single server request. Non-zero values + should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don`t + timeout requests. + -s, --server='' + The address and port of the Kubernetes API server + --tls-server-name='' + Server name to use for server certificate validation. If it is not provided, the + hostname used to contact the server is used + --token='' + Bearer token for authentication to the API server + --user='' + The name of the kubeconfig user to use + --username='' + Username for basic authentication to the API server + --warnings-as-errors=false + Treat warnings received from the server as errors and exit with a non-zero exit code +``` + diff --git a/docs/_includes/reference/cli/werf_kubectl_edit.short.md b/docs/_includes/reference/cli/werf_kubectl_edit.short.md new file mode 100644 index 0000000000..a791ab91b3 --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_edit.short.md @@ -0,0 +1 @@ +edit a resource on the server \ No newline at end of file diff --git a/docs/_includes/reference/cli/werf_kubectl_exec.md b/docs/_includes/reference/cli/werf_kubectl_exec.md new file mode 100644 index 0000000000..f48e69df02 --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_exec.md @@ -0,0 +1,117 @@ +{% if include.header %} +{% assign header = include.header %} +{% else %} +{% assign header = "###" %} +{% endif %} +Execute a command in a container. + +{{ header }} Syntax + +```shell +werf kubectl exec (POD | TYPE/NAME) [-c CONTAINER] [flags] -- COMMAND [args...] [options] +``` + +{{ header }} Examples + +```shell + # Get output from running the 'date' command from pod mypod, using the first container by default + kubectl exec mypod -- date + + # Get output from running the 'date' command in ruby-container from pod mypod + kubectl exec mypod -c ruby-container -- date + + # Switch to raw terminal mode; sends stdin to 'bash' in ruby-container from pod mypod + # and sends stdout/stderr from 'bash' back to the client + kubectl exec mypod -c ruby-container -i -t -- bash -il + + # List contents of /usr from the first container of pod mypod and sort by modification time + # If the command you want to execute in the pod has any flags in common (e.g. -i), + # you must use two dashes (--) to separate your command's flags/arguments + # Also note, do not surround your command and its flags/arguments with quotes + # unless that is how you would execute it normally (i.e., do ls -t /usr, not "ls -t /usr") + kubectl exec mypod -i -t -- ls -t /usr + + # Get output from running 'date' command from the first pod of the deployment mydeployment, using the first container by default + kubectl exec deploy/mydeployment -- date + + # Get output from running 'date' command from the first pod of the service myservice, using the first container by default + kubectl exec svc/myservice -- date +``` + +{{ header }} Options + +```shell + -c, --container='' + Container name. If omitted, use the kubectl.kubernetes.io/default-container annotation + for selecting the container to be attached or the first container in the pod will be + chosen + -f, --filename=[] + to use to exec into the resource + --pod-running-timeout=1m0s + The length of time (like 5s, 2m, or 3h, higher than zero) to wait until at least one + pod is running + -q, --quiet=false + Only print output from the remote session + -i, --stdin=false + Pass stdin to the container + -t, --tty=false + Stdin is a TTY +``` + +{{ header }} Options inherited from parent commands + +```shell + --as='' + Username to impersonate for the operation. User could be a regular user or a service + account in a namespace. + --as-group=[] + Group to impersonate for the operation, this flag can be repeated to specify multiple + groups. + --as-uid='' + UID to impersonate for the operation. + --cache-dir='~/.kube/cache' + Default cache directory + --certificate-authority='' + Path to a cert file for the certificate authority + --client-certificate='' + Path to a client certificate file for TLS + --client-key='' + Path to a client key file for TLS + --cluster='' + The name of the kubeconfig cluster to use + --context='' + The name of the kubeconfig context to use + --insecure-skip-tls-verify=false + If true, the server`s certificate will not be checked for validity. This will make your + HTTPS connections insecure + --kubeconfig='' + Path to the kubeconfig file to use for CLI requests. + --match-server-version=false + Require server version to match client version + -n, --namespace='' + If present, the namespace scope for this CLI request + --password='' + Password for basic authentication to the API server + --profile='none' + Name of profile to capture. One of (none|cpu|heap|goroutine|threadcreate|block|mutex) + --profile-output='profile.pprof' + Name of the file to write the profile to + --request-timeout='0' + The length of time to wait before giving up on a single server request. Non-zero values + should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don`t + timeout requests. + -s, --server='' + The address and port of the Kubernetes API server + --tls-server-name='' + Server name to use for server certificate validation. If it is not provided, the + hostname used to contact the server is used + --token='' + Bearer token for authentication to the API server + --user='' + The name of the kubeconfig user to use + --username='' + Username for basic authentication to the API server + --warnings-as-errors=false + Treat warnings received from the server as errors and exit with a non-zero exit code +``` + diff --git a/docs/_includes/reference/cli/werf_kubectl_exec.short.md b/docs/_includes/reference/cli/werf_kubectl_exec.short.md new file mode 100644 index 0000000000..30f1d51a17 --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_exec.short.md @@ -0,0 +1 @@ +execute a command in a container \ No newline at end of file diff --git a/docs/_includes/reference/cli/werf_kubectl_explain.md b/docs/_includes/reference/cli/werf_kubectl_explain.md new file mode 100644 index 0000000000..328b30741e --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_explain.md @@ -0,0 +1,97 @@ +{% if include.header %} +{% assign header = include.header %} +{% else %} +{% assign header = "###" %} +{% endif %} +List the fields for supported resources. + + This command describes the fields associated with each supported API resource. Fields are identified via a simple JSONPath identifier: + + <type>.<fieldName>[.<fieldName>] + + Add the --recursive flag to display all of the fields at once without descriptions. Information about each field is retrieved from the server in OpenAPI format. + +Use "kubectl api-resources" for a complete list of supported resources. + +{{ header }} Syntax + +```shell +werf kubectl explain RESOURCE [options] +``` + +{{ header }} Examples + +```shell + # Get the documentation of the resource and its fields + kubectl explain pods + + # Get the documentation of a specific field of a resource + kubectl explain pods.spec.containers +``` + +{{ header }} Options + +```shell + --api-version='' + Get different explanations for particular API version (API group/version) + --recursive=false + Print the fields of fields (Currently only 1 level deep) +``` + +{{ header }} Options inherited from parent commands + +```shell + --as='' + Username to impersonate for the operation. User could be a regular user or a service + account in a namespace. + --as-group=[] + Group to impersonate for the operation, this flag can be repeated to specify multiple + groups. + --as-uid='' + UID to impersonate for the operation. + --cache-dir='~/.kube/cache' + Default cache directory + --certificate-authority='' + Path to a cert file for the certificate authority + --client-certificate='' + Path to a client certificate file for TLS + --client-key='' + Path to a client key file for TLS + --cluster='' + The name of the kubeconfig cluster to use + --context='' + The name of the kubeconfig context to use + --insecure-skip-tls-verify=false + If true, the server`s certificate will not be checked for validity. This will make your + HTTPS connections insecure + --kubeconfig='' + Path to the kubeconfig file to use for CLI requests. + --match-server-version=false + Require server version to match client version + -n, --namespace='' + If present, the namespace scope for this CLI request + --password='' + Password for basic authentication to the API server + --profile='none' + Name of profile to capture. One of (none|cpu|heap|goroutine|threadcreate|block|mutex) + --profile-output='profile.pprof' + Name of the file to write the profile to + --request-timeout='0' + The length of time to wait before giving up on a single server request. Non-zero values + should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don`t + timeout requests. + -s, --server='' + The address and port of the Kubernetes API server + --tls-server-name='' + Server name to use for server certificate validation. If it is not provided, the + hostname used to contact the server is used + --token='' + Bearer token for authentication to the API server + --user='' + The name of the kubeconfig user to use + --username='' + Username for basic authentication to the API server + --warnings-as-errors=false + Treat warnings received from the server as errors and exit with a non-zero exit code +``` + diff --git a/docs/_includes/reference/cli/werf_kubectl_explain.short.md b/docs/_includes/reference/cli/werf_kubectl_explain.short.md new file mode 100644 index 0000000000..893f19da1e --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_explain.short.md @@ -0,0 +1 @@ +get documentation for a resource \ No newline at end of file diff --git a/docs/_includes/reference/cli/werf_kubectl_expose.md b/docs/_includes/reference/cli/werf_kubectl_expose.md new file mode 100644 index 0000000000..afb5008d19 --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_expose.md @@ -0,0 +1,176 @@ +{% if include.header %} +{% assign header = include.header %} +{% else %} +{% assign header = "###" %} +{% endif %} +Expose a resource as a new Kubernetes service. + + Looks up a deployment, service, replica set, replication controller or pod by name and uses the selector for that resource as the selector for a new service on the specified port. A deployment or replica set will be exposed as a service only if its selector is convertible to a selector that service supports, i.e. when the selector contains only the matchLabels component. Note that if no port is specified via --port and the exposed resource has multiple ports, all will be re-used by the new service. Also if no labels are specified, the new service will re-use the labels from the resource it exposes. + + Possible resources include (case insensitive): + + pod (po), service (svc), replicationcontroller (rc), deployment (deploy), replicaset (rs) + +{{ header }} Syntax + +```shell +werf kubectl expose (-f FILENAME | TYPE NAME) [--port=port] [--protocol=TCP|UDP|SCTP] [--target-port=number-or-name] [--name=name] [--external-ip=external-ip-of-service] [--type=type] [options] +``` + +{{ header }} Examples + +```shell + # Create a service for a replicated nginx, which serves on port 80 and connects to the containers on port 8000 + kubectl expose rc nginx --port=80 --target-port=8000 + + # Create a service for a replication controller identified by type and name specified in "nginx-controller.yaml", which serves on port 80 and connects to the containers on port 8000 + kubectl expose -f nginx-controller.yaml --port=80 --target-port=8000 + + # Create a service for a pod valid-pod, which serves on port 444 with the name "frontend" + kubectl expose pod valid-pod --port=444 --name=frontend + + # Create a second service based on the above service, exposing the container port 8443 as port 443 with the name "nginx-https" + kubectl expose service nginx --port=443 --target-port=8443 --name=nginx-https + + # Create a service for a replicated streaming application on port 4100 balancing UDP traffic and named 'video-stream'. + kubectl expose rc streamer --port=4100 --protocol=UDP --name=video-stream + + # Create a service for a replicated nginx using replica set, which serves on port 80 and connects to the containers on port 8000 + kubectl expose rs nginx --port=80 --target-port=8000 + + # Create a service for an nginx deployment, which serves on port 80 and connects to the containers on port 8000 + kubectl expose deployment nginx --port=80 --target-port=8000 +``` + +{{ header }} Options + +```shell + --allow-missing-template-keys=true + If true, ignore any errors in templates when a field or map key is missing in the + template. Only applies to golang and jsonpath output formats. + --cluster-ip='' + ClusterIP to be assigned to the service. Leave empty to auto-allocate, or set to `None` + to create a headless service. + --dry-run='none' + Must be "none", "server", or "client". If client strategy, only print the object that + would be sent, without sending it. If server strategy, submit server-side request + without persisting the resource. + --external-ip='' + Additional external IP address (not managed by Kubernetes) to accept for the service. + If this IP is routed to a node, the service can be accessed by this IP in addition to + its generated service IP. + --field-manager='kubectl-expose' + Name of the manager used to track field ownership. + -f, --filename=[] + Filename, directory, or URL to files identifying the resource to expose a service + --generator='service/v2' + The name of the API generator to use. There are 2 generators: `service/v1` and + `service/v2`. The only difference between them is that service port in v1 is named + `default`, while it is left unnamed in v2. Default is `service/v2`. + -k, --kustomize='' + Process the kustomization directory. This flag can`t be used together with -f or -R. + -l, --labels='' + Labels to apply to the service created by this call. + --load-balancer-ip='' + IP to assign to the LoadBalancer. If empty, an ephemeral IP will be created and used + (cloud-provider specific). + --name='' + The name for the newly created object. + -o, --output='' + Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile + |jsonpath|jsonpath-as-json|jsonpath-file. + --override-type='merge' + The method used to override the generated object: json, merge, or strategic. + --overrides='' + An inline JSON override for the generated object. If this is non-empty, it is used to + override the generated object. Requires that the object supply a valid apiVersion field. + --port='' + The port that the service should serve on. Copied from the resource being exposed, if + unspecified + --protocol='' + The network protocol for the service to be created. Default is `TCP`. + -R, --recursive=false + Process the directory used in -f, --filename recursively. Useful when you want to + manage related manifests organized within the same directory. + --save-config=false + If true, the configuration of current object will be saved in its annotation. + Otherwise, the annotation will be unchanged. This flag is useful when you want to + perform kubectl apply on this object in the future. + --selector='' + A label selector to use for this service. Only equality-based selector requirements are + supported. If empty (the default) infer the selector from the replication controller or + replica set.) + --session-affinity='' + If non-empty, set the session affinity for the service to this; legal values: `None`, + `ClientIP` + --show-managed-fields=false + If true, keep the managedFields when printing objects in JSON or YAML format. + --target-port='' + Name or number for the port on the container that the service should direct traffic to. + Optional. + --template='' + Template string or path to template file to use when -o=go-template, + -o=go-template-file. The template format is golang templates + [http://golang.org/pkg/text/template/#pkg-overview]. + --type='' + Type for this service: ClusterIP, NodePort, LoadBalancer, or ExternalName. Default is + `ClusterIP`. +``` + +{{ header }} Options inherited from parent commands + +```shell + --as='' + Username to impersonate for the operation. User could be a regular user or a service + account in a namespace. + --as-group=[] + Group to impersonate for the operation, this flag can be repeated to specify multiple + groups. + --as-uid='' + UID to impersonate for the operation. + --cache-dir='~/.kube/cache' + Default cache directory + --certificate-authority='' + Path to a cert file for the certificate authority + --client-certificate='' + Path to a client certificate file for TLS + --client-key='' + Path to a client key file for TLS + --cluster='' + The name of the kubeconfig cluster to use + --context='' + The name of the kubeconfig context to use + --insecure-skip-tls-verify=false + If true, the server`s certificate will not be checked for validity. This will make your + HTTPS connections insecure + --kubeconfig='' + Path to the kubeconfig file to use for CLI requests. + --match-server-version=false + Require server version to match client version + -n, --namespace='' + If present, the namespace scope for this CLI request + --password='' + Password for basic authentication to the API server + --profile='none' + Name of profile to capture. One of (none|cpu|heap|goroutine|threadcreate|block|mutex) + --profile-output='profile.pprof' + Name of the file to write the profile to + --request-timeout='0' + The length of time to wait before giving up on a single server request. Non-zero values + should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don`t + timeout requests. + -s, --server='' + The address and port of the Kubernetes API server + --tls-server-name='' + Server name to use for server certificate validation. If it is not provided, the + hostname used to contact the server is used + --token='' + Bearer token for authentication to the API server + --user='' + The name of the kubeconfig user to use + --username='' + Username for basic authentication to the API server + --warnings-as-errors=false + Treat warnings received from the server as errors and exit with a non-zero exit code +``` + diff --git a/docs/_includes/reference/cli/werf_kubectl_expose.short.md b/docs/_includes/reference/cli/werf_kubectl_expose.short.md new file mode 100644 index 0000000000..4da8c977d5 --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_expose.short.md @@ -0,0 +1 @@ +take a replication controller, service, deployment or pod and expose it as a new Kubernetes service \ No newline at end of file diff --git a/docs/_includes/reference/cli/werf_kubectl_get.md b/docs/_includes/reference/cli/werf_kubectl_get.md new file mode 100644 index 0000000000..bf52a0c908 --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_get.md @@ -0,0 +1,183 @@ +{% if include.header %} +{% assign header = include.header %} +{% else %} +{% assign header = "###" %} +{% endif %} +Display one or many resources. + + Prints a table of the most important information about the specified resources. You can filter the list using a label selector and the --selector flag. If the desired resource type is namespaced you will only see results in your current namespace unless you pass --all-namespaces. + + By specifying the output as 'template' and providing a Go template as the value of the --template flag, you can filter the attributes of the fetched resources. + +Use "kubectl api-resources" for a complete list of supported resources. + +{{ header }} Syntax + +```shell +werf kubectl get [(-o|--output=)json|yaml|name|go-template|go-template-file|template|templatefile|jsonpath|jsonpath-as-json|jsonpath-file|custom-columns-file|custom-columns|wide] (TYPE[.VERSION][.GROUP] [NAME | -l label] | TYPE[.VERSION][.GROUP]/NAME ...) [flags] [options] +``` + +{{ header }} Examples + +```shell + # List all pods in ps output format + kubectl get pods + + # List all pods in ps output format with more information (such as node name) + kubectl get pods -o wide + + # List a single replication controller with specified NAME in ps output format + kubectl get replicationcontroller web + + # List deployments in JSON output format, in the "v1" version of the "apps" API group + kubectl get deployments.v1.apps -o json + + # List a single pod in JSON output format + kubectl get -o json pod web-pod-13je7 + + # List a pod identified by type and name specified in "pod.yaml" in JSON output format + kubectl get -f pod.yaml -o json + + # List resources from a directory with kustomization.yaml - e.g. dir/kustomization.yaml + kubectl get -k dir/ + + # Return only the phase value of the specified pod + kubectl get -o template pod/web-pod-13je7 --template={{.status.phase}} + + # List resource information in custom columns + kubectl get pod test-pod -o custom-columns=CONTAINER:.spec.containers[0].name,IMAGE:.spec.containers[0].image + + # List all replication controllers and services together in ps output format + kubectl get rc,services + + # List one or more resources by their type and names + kubectl get rc/web service/frontend pods/web-pod-13je7 +``` + +{{ header }} Options + +```shell + -A, --all-namespaces=false + If present, list the requested object(s) across all namespaces. Namespace in current + context is ignored even if specified with --namespace. + --allow-missing-template-keys=true + If true, ignore any errors in templates when a field or map key is missing in the + template. Only applies to golang and jsonpath output formats. + --chunk-size=500 + Return large lists in chunks rather than all at once. Pass 0 to disable. This flag is + beta and may change in the future. + --field-selector='' + Selector (field query) to filter on, supports `=`, `==`, and `!=`.(e.g. + --field-selector key1=value1,key2=value2). The server only supports a limited number of + field queries per type. + -f, --filename=[] + Filename, directory, or URL to files identifying the resource to get from a server. + --ignore-not-found=false + If the requested object does not exist the command will return exit code 0. + -k, --kustomize='' + Process the kustomization directory. This flag can`t be used together with -f or -R. + -L, --label-columns=[] + Accepts a comma separated list of labels that are going to be presented as columns. + Names are case-sensitive. You can also use multiple flag options like -L label1 -L + label2... + --no-headers=false + When using the default or custom-column output format, don`t print headers (default + print headers). + -o, --output='' + Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile + |jsonpath|jsonpath-as-json|jsonpath-file|custom-columns-file|custom-columns|wide See + custom columns [https://kubernetes.io/docs/reference/kubectl/overview/#custom-columns], + golang template [http://golang.org/pkg/text/template/#pkg-overview] and jsonpath + template [https://kubernetes.io/docs/reference/kubectl/jsonpath/]. + --output-watch-events=false + Output watch event objects when --watch or --watch-only is used. Existing objects are + output as initial ADDED events. + --raw='' + Raw URI to request from the server. Uses the transport specified by the kubeconfig + file. + -R, --recursive=false + Process the directory used in -f, --filename recursively. Useful when you want to + manage related manifests organized within the same directory. + -l, --selector='' + Selector (label query) to filter on, supports `=`, `==`, and `!=`.(e.g. -l + key1=value1,key2=value2) + --server-print=true + If true, have the server return the appropriate table output. Supports extension APIs + and CRDs. + --show-kind=false + If present, list the resource type for the requested object(s). + --show-labels=false + When printing, show all labels as the last column (default hide labels column) + --show-managed-fields=false + If true, keep the managedFields when printing objects in JSON or YAML format. + --sort-by='' + If non-empty, sort list types using this field specification. The field specification + is expressed as a JSONPath expression (e.g. `{.metadata.name}`). The field in the API + resource specified by this JSONPath expression must be an integer or a string. + --template='' + Template string or path to template file to use when -o=go-template, + -o=go-template-file. The template format is golang templates + [http://golang.org/pkg/text/template/#pkg-overview]. + -w, --watch=false + After listing/getting the requested object, watch for changes. + --watch-only=false + Watch for changes to the requested object(s), without listing/getting first. +``` + +{{ header }} Options inherited from parent commands + +```shell + --as='' + Username to impersonate for the operation. User could be a regular user or a service + account in a namespace. + --as-group=[] + Group to impersonate for the operation, this flag can be repeated to specify multiple + groups. + --as-uid='' + UID to impersonate for the operation. + --cache-dir='~/.kube/cache' + Default cache directory + --certificate-authority='' + Path to a cert file for the certificate authority + --client-certificate='' + Path to a client certificate file for TLS + --client-key='' + Path to a client key file for TLS + --cluster='' + The name of the kubeconfig cluster to use + --context='' + The name of the kubeconfig context to use + --insecure-skip-tls-verify=false + If true, the server`s certificate will not be checked for validity. This will make your + HTTPS connections insecure + --kubeconfig='' + Path to the kubeconfig file to use for CLI requests. + --match-server-version=false + Require server version to match client version + -n, --namespace='' + If present, the namespace scope for this CLI request + --password='' + Password for basic authentication to the API server + --profile='none' + Name of profile to capture. One of (none|cpu|heap|goroutine|threadcreate|block|mutex) + --profile-output='profile.pprof' + Name of the file to write the profile to + --request-timeout='0' + The length of time to wait before giving up on a single server request. Non-zero values + should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don`t + timeout requests. + -s, --server='' + The address and port of the Kubernetes API server + --tls-server-name='' + Server name to use for server certificate validation. If it is not provided, the + hostname used to contact the server is used + --token='' + Bearer token for authentication to the API server + --user='' + The name of the kubeconfig user to use + --username='' + Username for basic authentication to the API server + --warnings-as-errors=false + Treat warnings received from the server as errors and exit with a non-zero exit code +``` + diff --git a/docs/_includes/reference/cli/werf_kubectl_get.short.md b/docs/_includes/reference/cli/werf_kubectl_get.short.md new file mode 100644 index 0000000000..f4f01610ff --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_get.short.md @@ -0,0 +1 @@ +display one or many resources \ No newline at end of file diff --git a/docs/_includes/reference/cli/werf_kubectl_kustomize.md b/docs/_includes/reference/cli/werf_kubectl_kustomize.md new file mode 100644 index 0000000000..b16c25d24f --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_kustomize.md @@ -0,0 +1,114 @@ +{% if include.header %} +{% assign header = include.header %} +{% else %} +{% assign header = "###" %} +{% endif %} +Build a set of KRM resources using a 'kustomization.yaml' file. The DIR argument must be a path to a directory containing 'kustomization.yaml', or a git repository URL with a path suffix specifying same with respect to the repository root. If DIR is omitted, '.' is assumed. + +{{ header }} Syntax + +```shell +werf kubectl kustomize DIR [flags] [options] +``` + +{{ header }} Examples + +```shell + # Build the current working directory + kubectl kustomize + + # Build some shared configuration directory + kubectl kustomize /home/config/production + + # Build from github + kubectl kustomize https://github.com/kubernetes-sigs/kustomize.git/examples/helloWorld?ref=v1.0.6 +``` + +{{ header }} Options + +```shell + --as-current-user=false + use the uid and gid of the command executor to run the function in the container + --enable-alpha-plugins=false + enable kustomize plugins + --enable-helm=false + Enable use of the Helm chart inflator generator. + --enable-managedby-label=false + enable adding app.kubernetes.io/managed-by + -e, --env=[] + a list of environment variables to be used by functions + --helm-command='helm' + helm command (path to executable) + --load-restrictor='LoadRestrictionsRootOnly' + if set to `LoadRestrictionsNone`, local kustomizations may load files from outside + their root. This does, however, break the relocatability of the kustomization. + --mount=[] + a list of storage options read from the filesystem + --network=false + enable network access for functions that declare it + --network-name='bridge' + the docker network to run the container in + -o, --output='' + If specified, write output to this path. + --reorder='legacy' + Reorder the resources just before output. Use `legacy` to apply a legacy reordering + (Namespaces first, Webhooks last, etc). Use `none` to suppress a final reordering. +``` + +{{ header }} Options inherited from parent commands + +```shell + --as='' + Username to impersonate for the operation. User could be a regular user or a service + account in a namespace. + --as-group=[] + Group to impersonate for the operation, this flag can be repeated to specify multiple + groups. + --as-uid='' + UID to impersonate for the operation. + --cache-dir='~/.kube/cache' + Default cache directory + --certificate-authority='' + Path to a cert file for the certificate authority + --client-certificate='' + Path to a client certificate file for TLS + --client-key='' + Path to a client key file for TLS + --cluster='' + The name of the kubeconfig cluster to use + --context='' + The name of the kubeconfig context to use + --insecure-skip-tls-verify=false + If true, the server`s certificate will not be checked for validity. This will make your + HTTPS connections insecure + --kubeconfig='' + Path to the kubeconfig file to use for CLI requests. + --match-server-version=false + Require server version to match client version + -n, --namespace='' + If present, the namespace scope for this CLI request + --password='' + Password for basic authentication to the API server + --profile='none' + Name of profile to capture. One of (none|cpu|heap|goroutine|threadcreate|block|mutex) + --profile-output='profile.pprof' + Name of the file to write the profile to + --request-timeout='0' + The length of time to wait before giving up on a single server request. Non-zero values + should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don`t + timeout requests. + -s, --server='' + The address and port of the Kubernetes API server + --tls-server-name='' + Server name to use for server certificate validation. If it is not provided, the + hostname used to contact the server is used + --token='' + Bearer token for authentication to the API server + --user='' + The name of the kubeconfig user to use + --username='' + Username for basic authentication to the API server + --warnings-as-errors=false + Treat warnings received from the server as errors and exit with a non-zero exit code +``` + diff --git a/docs/_includes/reference/cli/werf_kubectl_kustomize.short.md b/docs/_includes/reference/cli/werf_kubectl_kustomize.short.md new file mode 100644 index 0000000000..e89a6a9c21 --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_kustomize.short.md @@ -0,0 +1 @@ +build a kustomization target from a directory or URL. \ No newline at end of file diff --git a/docs/_includes/reference/cli/werf_kubectl_label.md b/docs/_includes/reference/cli/werf_kubectl_label.md new file mode 100644 index 0000000000..e9dd8a0b9f --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_label.md @@ -0,0 +1,149 @@ +{% if include.header %} +{% assign header = include.header %} +{% else %} +{% assign header = "###" %} +{% endif %} +Update the labels on a resource. + + * A label key and value must begin with a letter or number, and may contain letters, numbers, hyphens, dots, and underscores, up to 63 characters each. + * Optionally, the key can begin with a DNS subdomain prefix and a single '/', like example.com/my-app. + * If --overwrite is true, then existing labels can be overwritten, otherwise attempting to overwrite a label will result in an error. + * If --resource-version is specified, then updates will use this resource version, otherwise the existing resource-version will be used. + +{{ header }} Syntax + +```shell +werf kubectl label [--overwrite] (-f FILENAME | TYPE NAME) KEY_1=VAL_1 ... KEY_N=VAL_N [--resource-version=version] [options] +``` + +{{ header }} Examples + +```shell + # Update pod 'foo' with the label 'unhealthy' and the value 'true' + kubectl label pods foo unhealthy=true + + # Update pod 'foo' with the label 'status' and the value 'unhealthy', overwriting any existing value + kubectl label --overwrite pods foo status=unhealthy + + # Update all pods in the namespace + kubectl label pods --all status=unhealthy + + # Update a pod identified by the type and name in "pod.json" + kubectl label -f pod.json status=unhealthy + + # Update pod 'foo' only if the resource is unchanged from version 1 + kubectl label pods foo status=unhealthy --resource-version=1 + + # Update pod 'foo' by removing a label named 'bar' if it exists + # Does not require the --overwrite flag + kubectl label pods foo bar- +``` + +{{ header }} Options + +```shell + --all=false + Select all resources, in the namespace of the specified resource types + -A, --all-namespaces=false + If true, check the specified action in all namespaces. + --allow-missing-template-keys=true + If true, ignore any errors in templates when a field or map key is missing in the + template. Only applies to golang and jsonpath output formats. + --dry-run='none' + Must be "none", "server", or "client". If client strategy, only print the object that + would be sent, without sending it. If server strategy, submit server-side request + without persisting the resource. + --field-manager='kubectl-label' + Name of the manager used to track field ownership. + --field-selector='' + Selector (field query) to filter on, supports `=`, `==`, and `!=`.(e.g. + --field-selector key1=value1,key2=value2). The server only supports a limited number of + field queries per type. + -f, --filename=[] + Filename, directory, or URL to files identifying the resource to update the labels + -k, --kustomize='' + Process the kustomization directory. This flag can`t be used together with -f or -R. + --list=false + If true, display the labels for a given resource. + --local=false + If true, label will NOT contact api-server but run locally. + -o, --output='' + Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile + |jsonpath|jsonpath-as-json|jsonpath-file. + --overwrite=false + If true, allow labels to be overwritten, otherwise reject label updates that overwrite + existing labels. + -R, --recursive=false + Process the directory used in -f, --filename recursively. Useful when you want to + manage related manifests organized within the same directory. + --resource-version='' + If non-empty, the labels update will only succeed if this is the current + resource-version for the object. Only valid when specifying a single resource. + -l, --selector='' + Selector (label query) to filter on, supports `=`, `==`, and `!=`.(e.g. -l + key1=value1,key2=value2). + --show-managed-fields=false + If true, keep the managedFields when printing objects in JSON or YAML format. + --template='' + Template string or path to template file to use when -o=go-template, + -o=go-template-file. The template format is golang templates + [http://golang.org/pkg/text/template/#pkg-overview]. +``` + +{{ header }} Options inherited from parent commands + +```shell + --as='' + Username to impersonate for the operation. User could be a regular user or a service + account in a namespace. + --as-group=[] + Group to impersonate for the operation, this flag can be repeated to specify multiple + groups. + --as-uid='' + UID to impersonate for the operation. + --cache-dir='~/.kube/cache' + Default cache directory + --certificate-authority='' + Path to a cert file for the certificate authority + --client-certificate='' + Path to a client certificate file for TLS + --client-key='' + Path to a client key file for TLS + --cluster='' + The name of the kubeconfig cluster to use + --context='' + The name of the kubeconfig context to use + --insecure-skip-tls-verify=false + If true, the server`s certificate will not be checked for validity. This will make your + HTTPS connections insecure + --kubeconfig='' + Path to the kubeconfig file to use for CLI requests. + --match-server-version=false + Require server version to match client version + -n, --namespace='' + If present, the namespace scope for this CLI request + --password='' + Password for basic authentication to the API server + --profile='none' + Name of profile to capture. One of (none|cpu|heap|goroutine|threadcreate|block|mutex) + --profile-output='profile.pprof' + Name of the file to write the profile to + --request-timeout='0' + The length of time to wait before giving up on a single server request. Non-zero values + should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don`t + timeout requests. + -s, --server='' + The address and port of the Kubernetes API server + --tls-server-name='' + Server name to use for server certificate validation. If it is not provided, the + hostname used to contact the server is used + --token='' + Bearer token for authentication to the API server + --user='' + The name of the kubeconfig user to use + --username='' + Username for basic authentication to the API server + --warnings-as-errors=false + Treat warnings received from the server as errors and exit with a non-zero exit code +``` + diff --git a/docs/_includes/reference/cli/werf_kubectl_label.short.md b/docs/_includes/reference/cli/werf_kubectl_label.short.md new file mode 100644 index 0000000000..05f516f19a --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_label.short.md @@ -0,0 +1 @@ +update the labels on a resource \ No newline at end of file diff --git a/docs/_includes/reference/cli/werf_kubectl_logs.md b/docs/_includes/reference/cli/werf_kubectl_logs.md new file mode 100644 index 0000000000..317b6fc452 --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_logs.md @@ -0,0 +1,150 @@ +{% if include.header %} +{% assign header = include.header %} +{% else %} +{% assign header = "###" %} +{% endif %} +Print the logs for a container in a pod or specified resource. If the pod has only one container, the container name is optional. + +{{ header }} Syntax + +```shell +werf kubectl logs [-f] [-p] (POD | TYPE/NAME) [-c CONTAINER] [options] +``` + +{{ header }} Examples + +```shell + # Return snapshot logs from pod nginx with only one container + kubectl logs nginx + + # Return snapshot logs from pod nginx with multi containers + kubectl logs nginx --all-containers=true + + # Return snapshot logs from all containers in pods defined by label app=nginx + kubectl logs -l app=nginx --all-containers=true + + # Return snapshot of previous terminated ruby container logs from pod web-1 + kubectl logs -p -c ruby web-1 + + # Begin streaming the logs of the ruby container in pod web-1 + kubectl logs -f -c ruby web-1 + + # Begin streaming the logs from all containers in pods defined by label app=nginx + kubectl logs -f -l app=nginx --all-containers=true + + # Display only the most recent 20 lines of output in pod nginx + kubectl logs --tail=20 nginx + + # Show all logs from pod nginx written in the last hour + kubectl logs --since=1h nginx + + # Show logs from a kubelet with an expired serving certificate + kubectl logs --insecure-skip-tls-verify-backend nginx + + # Return snapshot logs from first container of a job named hello + kubectl logs job/hello + + # Return snapshot logs from container nginx-1 of a deployment named nginx + kubectl logs deployment/nginx -c nginx-1 +``` + +{{ header }} Options + +```shell + --all-containers=false + Get all containers` logs in the pod(s). + -c, --container='' + Print the logs of this container + -f, --follow=false + Specify if the logs should be streamed. + --ignore-errors=false + If watching / following pod logs, allow for any errors that occur to be non-fatal + --insecure-skip-tls-verify-backend=false + Skip verifying the identity of the kubelet that logs are requested from. In theory, an + attacker could provide invalid log content back. You might want to use this if your + kubelet serving certificates have expired. + --limit-bytes=0 + Maximum bytes of logs to return. Defaults to no limit. + --max-log-requests=5 + Specify maximum number of concurrent logs to follow when using by a selector. Defaults + to 5. + --pod-running-timeout=20s + The length of time (like 5s, 2m, or 3h, higher than zero) to wait until at least one + pod is running + --prefix=false + Prefix each log line with the log source (pod name and container name) + -p, --previous=false + If true, print the logs for the previous instance of the container in a pod if it + exists. + -l, --selector='' + Selector (label query) to filter on. + --since=0s + Only return logs newer than a relative duration like 5s, 2m, or 3h. Defaults to all + logs. Only one of since-time / since may be used. + --since-time='' + Only return logs after a specific date (RFC3339). Defaults to all logs. Only one of + since-time / since may be used. + --tail=-1 + Lines of recent log file to display. Defaults to -1 with no selector, showing all log + lines otherwise 10, if a selector is provided. + --timestamps=false + Include timestamps on each line in the log output +``` + +{{ header }} Options inherited from parent commands + +```shell + --as='' + Username to impersonate for the operation. User could be a regular user or a service + account in a namespace. + --as-group=[] + Group to impersonate for the operation, this flag can be repeated to specify multiple + groups. + --as-uid='' + UID to impersonate for the operation. + --cache-dir='~/.kube/cache' + Default cache directory + --certificate-authority='' + Path to a cert file for the certificate authority + --client-certificate='' + Path to a client certificate file for TLS + --client-key='' + Path to a client key file for TLS + --cluster='' + The name of the kubeconfig cluster to use + --context='' + The name of the kubeconfig context to use + --insecure-skip-tls-verify=false + If true, the server`s certificate will not be checked for validity. This will make your + HTTPS connections insecure + --kubeconfig='' + Path to the kubeconfig file to use for CLI requests. + --match-server-version=false + Require server version to match client version + -n, --namespace='' + If present, the namespace scope for this CLI request + --password='' + Password for basic authentication to the API server + --profile='none' + Name of profile to capture. One of (none|cpu|heap|goroutine|threadcreate|block|mutex) + --profile-output='profile.pprof' + Name of the file to write the profile to + --request-timeout='0' + The length of time to wait before giving up on a single server request. Non-zero values + should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don`t + timeout requests. + -s, --server='' + The address and port of the Kubernetes API server + --tls-server-name='' + Server name to use for server certificate validation. If it is not provided, the + hostname used to contact the server is used + --token='' + Bearer token for authentication to the API server + --user='' + The name of the kubeconfig user to use + --username='' + Username for basic authentication to the API server + --warnings-as-errors=false + Treat warnings received from the server as errors and exit with a non-zero exit code +``` + diff --git a/docs/_includes/reference/cli/werf_kubectl_logs.short.md b/docs/_includes/reference/cli/werf_kubectl_logs.short.md new file mode 100644 index 0000000000..fb530a750f --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_logs.short.md @@ -0,0 +1 @@ +print the logs for a container in a pod \ No newline at end of file diff --git a/docs/_includes/reference/cli/werf_kubectl_options.md b/docs/_includes/reference/cli/werf_kubectl_options.md new file mode 100644 index 0000000000..c945ebb5b7 --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_options.md @@ -0,0 +1,77 @@ +{% if include.header %} +{% assign header = include.header %} +{% else %} +{% assign header = "###" %} +{% endif %} +Print the list of flags inherited by all commands + +{{ header }} Syntax + +```shell +werf kubectl options +``` + +{{ header }} Examples + +```shell + # Print flags inherited by all commands + kubectl options +``` + +{{ header }} Options inherited from parent commands + +```shell + --as='' + Username to impersonate for the operation. User could be a regular user or a service + account in a namespace. + --as-group=[] + Group to impersonate for the operation, this flag can be repeated to specify multiple + groups. + --as-uid='' + UID to impersonate for the operation. + --cache-dir='~/.kube/cache' + Default cache directory + --certificate-authority='' + Path to a cert file for the certificate authority + --client-certificate='' + Path to a client certificate file for TLS + --client-key='' + Path to a client key file for TLS + --cluster='' + The name of the kubeconfig cluster to use + --context='' + The name of the kubeconfig context to use + --insecure-skip-tls-verify=false + If true, the server`s certificate will not be checked for validity. This will make your + HTTPS connections insecure + --kubeconfig='' + Path to the kubeconfig file to use for CLI requests. + --match-server-version=false + Require server version to match client version + -n, --namespace='' + If present, the namespace scope for this CLI request + --password='' + Password for basic authentication to the API server + --profile='none' + Name of profile to capture. One of (none|cpu|heap|goroutine|threadcreate|block|mutex) + --profile-output='profile.pprof' + Name of the file to write the profile to + --request-timeout='0' + The length of time to wait before giving up on a single server request. Non-zero values + should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don`t + timeout requests. + -s, --server='' + The address and port of the Kubernetes API server + --tls-server-name='' + Server name to use for server certificate validation. If it is not provided, the + hostname used to contact the server is used + --token='' + Bearer token for authentication to the API server + --user='' + The name of the kubeconfig user to use + --username='' + Username for basic authentication to the API server + --warnings-as-errors=false + Treat warnings received from the server as errors and exit with a non-zero exit code +``` + diff --git a/docs/_includes/reference/cli/werf_kubectl_options.short.md b/docs/_includes/reference/cli/werf_kubectl_options.short.md new file mode 100644 index 0000000000..61e521908f --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_options.short.md @@ -0,0 +1 @@ +print the list of flags inherited by all commands \ No newline at end of file diff --git a/docs/_includes/reference/cli/werf_kubectl_patch.md b/docs/_includes/reference/cli/werf_kubectl_patch.md new file mode 100644 index 0000000000..fcef3e7e10 --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_patch.md @@ -0,0 +1,129 @@ +{% if include.header %} +{% assign header = include.header %} +{% else %} +{% assign header = "###" %} +{% endif %} +Update fields of a resource using strategic merge patch, a JSON merge patch, or a JSON patch. + + JSON and YAML formats are accepted. + +{{ header }} Syntax + +```shell +werf kubectl patch (-f FILENAME | TYPE NAME) [-p PATCH|--patch-file FILE] [options] +``` + +{{ header }} Examples + +```shell + # Partially update a node using a strategic merge patch, specifying the patch as JSON + kubectl patch node k8s-node-1 -p '{"spec":{"unschedulable":true}}' + + # Partially update a node using a strategic merge patch, specifying the patch as YAML + kubectl patch node k8s-node-1 -p $'spec:\n unschedulable: true' + + # Partially update a node identified by the type and name specified in "node.json" using strategic merge patch + kubectl patch -f node.json -p '{"spec":{"unschedulable":true}}' + + # Update a container's image; spec.containers[*].name is required because it's a merge key + kubectl patch pod valid-pod -p '{"spec":{"containers":[{"name":"kubernetes-serve-hostname","image":"new image"}]}}' + + # Update a container's image using a JSON patch with positional arrays + kubectl patch pod valid-pod --type='json' -p='[{"op": "replace", "path": "/spec/containers/0/image", "value":"new image"}]' +``` + +{{ header }} Options + +```shell + --allow-missing-template-keys=true + If true, ignore any errors in templates when a field or map key is missing in the + template. Only applies to golang and jsonpath output formats. + --dry-run='none' + Must be "none", "server", or "client". If client strategy, only print the object that + would be sent, without sending it. If server strategy, submit server-side request + without persisting the resource. + --field-manager='kubectl-patch' + Name of the manager used to track field ownership. + -f, --filename=[] + Filename, directory, or URL to files identifying the resource to update + -k, --kustomize='' + Process the kustomization directory. This flag can`t be used together with -f or -R. + --local=false + If true, patch will operate on the content of the file, not the server-side resource. + -o, --output='' + Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile + |jsonpath|jsonpath-as-json|jsonpath-file. + -p, --patch='' + The patch to be applied to the resource JSON file. + --patch-file='' + A file containing a patch to be applied to the resource. + -R, --recursive=false + Process the directory used in -f, --filename recursively. Useful when you want to + manage related manifests organized within the same directory. + --show-managed-fields=false + If true, keep the managedFields when printing objects in JSON or YAML format. + --template='' + Template string or path to template file to use when -o=go-template, + -o=go-template-file. The template format is golang templates + [http://golang.org/pkg/text/template/#pkg-overview]. + --type='strategic' + The type of patch being provided; one of [json merge strategic] +``` + +{{ header }} Options inherited from parent commands + +```shell + --as='' + Username to impersonate for the operation. User could be a regular user or a service + account in a namespace. + --as-group=[] + Group to impersonate for the operation, this flag can be repeated to specify multiple + groups. + --as-uid='' + UID to impersonate for the operation. + --cache-dir='~/.kube/cache' + Default cache directory + --certificate-authority='' + Path to a cert file for the certificate authority + --client-certificate='' + Path to a client certificate file for TLS + --client-key='' + Path to a client key file for TLS + --cluster='' + The name of the kubeconfig cluster to use + --context='' + The name of the kubeconfig context to use + --insecure-skip-tls-verify=false + If true, the server`s certificate will not be checked for validity. This will make your + HTTPS connections insecure + --kubeconfig='' + Path to the kubeconfig file to use for CLI requests. + --match-server-version=false + Require server version to match client version + -n, --namespace='' + If present, the namespace scope for this CLI request + --password='' + Password for basic authentication to the API server + --profile='none' + Name of profile to capture. One of (none|cpu|heap|goroutine|threadcreate|block|mutex) + --profile-output='profile.pprof' + Name of the file to write the profile to + --request-timeout='0' + The length of time to wait before giving up on a single server request. Non-zero values + should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don`t + timeout requests. + -s, --server='' + The address and port of the Kubernetes API server + --tls-server-name='' + Server name to use for server certificate validation. If it is not provided, the + hostname used to contact the server is used + --token='' + Bearer token for authentication to the API server + --user='' + The name of the kubeconfig user to use + --username='' + Username for basic authentication to the API server + --warnings-as-errors=false + Treat warnings received from the server as errors and exit with a non-zero exit code +``` + diff --git a/docs/_includes/reference/cli/werf_kubectl_patch.short.md b/docs/_includes/reference/cli/werf_kubectl_patch.short.md new file mode 100644 index 0000000000..b4726cb00c --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_patch.short.md @@ -0,0 +1 @@ +update fields of a resource \ No newline at end of file diff --git a/docs/_includes/reference/cli/werf_kubectl_plugin.md b/docs/_includes/reference/cli/werf_kubectl_plugin.md new file mode 100644 index 0000000000..101ae4b1ad --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_plugin.md @@ -0,0 +1,74 @@ +{% if include.header %} +{% assign header = include.header %} +{% else %} +{% assign header = "###" %} +{% endif %} +Provides utilities for interacting with plugins. + + Plugins provide extended functionality that is not part of the major command-line distribution. Please refer to the documentation and examples for more information about how write your own plugins. + + The easiest way to discover and install plugins is via the kubernetes sub-project krew. To install krew, visit [https://krew.sigs.k8s.io/docs/user-guide/setup/install/](https://krew.sigs.k8s.io/docs/user-guide/setup/install/) + +{{ header }} Syntax + +```shell +werf kubectl plugin [flags] +``` + +{{ header }} Options inherited from parent commands + +```shell + --as='' + Username to impersonate for the operation. User could be a regular user or a service + account in a namespace. + --as-group=[] + Group to impersonate for the operation, this flag can be repeated to specify multiple + groups. + --as-uid='' + UID to impersonate for the operation. + --cache-dir='~/.kube/cache' + Default cache directory + --certificate-authority='' + Path to a cert file for the certificate authority + --client-certificate='' + Path to a client certificate file for TLS + --client-key='' + Path to a client key file for TLS + --cluster='' + The name of the kubeconfig cluster to use + --context='' + The name of the kubeconfig context to use + --insecure-skip-tls-verify=false + If true, the server`s certificate will not be checked for validity. This will make your + HTTPS connections insecure + --kubeconfig='' + Path to the kubeconfig file to use for CLI requests. + --match-server-version=false + Require server version to match client version + -n, --namespace='' + If present, the namespace scope for this CLI request + --password='' + Password for basic authentication to the API server + --profile='none' + Name of profile to capture. One of (none|cpu|heap|goroutine|threadcreate|block|mutex) + --profile-output='profile.pprof' + Name of the file to write the profile to + --request-timeout='0' + The length of time to wait before giving up on a single server request. Non-zero values + should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don`t + timeout requests. + -s, --server='' + The address and port of the Kubernetes API server + --tls-server-name='' + Server name to use for server certificate validation. If it is not provided, the + hostname used to contact the server is used + --token='' + Bearer token for authentication to the API server + --user='' + The name of the kubeconfig user to use + --username='' + Username for basic authentication to the API server + --warnings-as-errors=false + Treat warnings received from the server as errors and exit with a non-zero exit code +``` + diff --git a/docs/_includes/reference/cli/werf_kubectl_plugin.short.md b/docs/_includes/reference/cli/werf_kubectl_plugin.short.md new file mode 100644 index 0000000000..35f606889c --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_plugin.short.md @@ -0,0 +1 @@ +provides utilities for interacting with plugins \ No newline at end of file diff --git a/docs/_includes/reference/cli/werf_kubectl_plugin_list.md b/docs/_includes/reference/cli/werf_kubectl_plugin_list.md new file mode 100644 index 0000000000..2a9cc302c4 --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_plugin_list.md @@ -0,0 +1,79 @@ +{% if include.header %} +{% assign header = include.header %} +{% else %} +{% assign header = "###" %} +{% endif %} +List all available plugin files on a user's PATH. + + Available plugin files are those that are: - executable - anywhere on the user's PATH - begin with "kubectl-" + +{{ header }} Syntax + +```shell +werf kubectl plugin list [flags] [options] +``` + +{{ header }} Options + +```shell + --name-only=false + If true, display only the binary name of each plugin, rather than its full path +``` + +{{ header }} Options inherited from parent commands + +```shell + --as='' + Username to impersonate for the operation. User could be a regular user or a service + account in a namespace. + --as-group=[] + Group to impersonate for the operation, this flag can be repeated to specify multiple + groups. + --as-uid='' + UID to impersonate for the operation. + --cache-dir='~/.kube/cache' + Default cache directory + --certificate-authority='' + Path to a cert file for the certificate authority + --client-certificate='' + Path to a client certificate file for TLS + --client-key='' + Path to a client key file for TLS + --cluster='' + The name of the kubeconfig cluster to use + --context='' + The name of the kubeconfig context to use + --insecure-skip-tls-verify=false + If true, the server`s certificate will not be checked for validity. This will make your + HTTPS connections insecure + --kubeconfig='' + Path to the kubeconfig file to use for CLI requests. + --match-server-version=false + Require server version to match client version + -n, --namespace='' + If present, the namespace scope for this CLI request + --password='' + Password for basic authentication to the API server + --profile='none' + Name of profile to capture. One of (none|cpu|heap|goroutine|threadcreate|block|mutex) + --profile-output='profile.pprof' + Name of the file to write the profile to + --request-timeout='0' + The length of time to wait before giving up on a single server request. Non-zero values + should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don`t + timeout requests. + -s, --server='' + The address and port of the Kubernetes API server + --tls-server-name='' + Server name to use for server certificate validation. If it is not provided, the + hostname used to contact the server is used + --token='' + Bearer token for authentication to the API server + --user='' + The name of the kubeconfig user to use + --username='' + Username for basic authentication to the API server + --warnings-as-errors=false + Treat warnings received from the server as errors and exit with a non-zero exit code +``` + diff --git a/docs/_includes/reference/cli/werf_kubectl_plugin_list.short.md b/docs/_includes/reference/cli/werf_kubectl_plugin_list.short.md new file mode 100644 index 0000000000..3359fa6b43 --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_plugin_list.short.md @@ -0,0 +1 @@ +list all visible plugin executables on a user's PATH \ No newline at end of file diff --git a/docs/_includes/reference/cli/werf_kubectl_port_forward.md b/docs/_includes/reference/cli/werf_kubectl_port_forward.md new file mode 100644 index 0000000000..1ccbf62d15 --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_port_forward.md @@ -0,0 +1,111 @@ +{% if include.header %} +{% assign header = include.header %} +{% else %} +{% assign header = "###" %} +{% endif %} +Forward one or more local ports to a pod. + + Use resource type/name such as deployment/mydeployment to select a pod. Resource type defaults to 'pod' if omitted. + + If there are multiple pods matching the criteria, a pod will be selected automatically. The forwarding session ends when the selected pod terminates, and a rerun of the command is needed to resume forwarding. + +{{ header }} Syntax + +```shell +werf kubectl port-forward TYPE/NAME [options] [LOCAL_PORT:]REMOTE_PORT [...[LOCAL_PORT_N:]REMOTE_PORT_N] +``` + +{{ header }} Examples + +```shell + # Listen on ports 5000 and 6000 locally, forwarding data to/from ports 5000 and 6000 in the pod + kubectl port-forward pod/mypod 5000 6000 + + # Listen on ports 5000 and 6000 locally, forwarding data to/from ports 5000 and 6000 in a pod selected by the deployment + kubectl port-forward deployment/mydeployment 5000 6000 + + # Listen on port 8443 locally, forwarding to the targetPort of the service's port named "https" in a pod selected by the service + kubectl port-forward service/myservice 8443:https + + # Listen on port 8888 locally, forwarding to 5000 in the pod + kubectl port-forward pod/mypod 8888:5000 + + # Listen on port 8888 on all addresses, forwarding to 5000 in the pod + kubectl port-forward --address 0.0.0.0 pod/mypod 8888:5000 + + # Listen on port 8888 on localhost and selected IP, forwarding to 5000 in the pod + kubectl port-forward --address localhost,10.19.21.23 pod/mypod 8888:5000 + + # Listen on a random port locally, forwarding to 5000 in the pod + kubectl port-forward pod/mypod :5000 +``` + +{{ header }} Options + +```shell + --address=[localhost] + Addresses to listen on (comma separated). Only accepts IP addresses or localhost as a + value. When localhost is supplied, kubectl will try to bind on both 127.0.0.1 and ::1 + and will fail if neither of these addresses are available to bind. + --pod-running-timeout=1m0s + The length of time (like 5s, 2m, or 3h, higher than zero) to wait until at least one + pod is running +``` + +{{ header }} Options inherited from parent commands + +```shell + --as='' + Username to impersonate for the operation. User could be a regular user or a service + account in a namespace. + --as-group=[] + Group to impersonate for the operation, this flag can be repeated to specify multiple + groups. + --as-uid='' + UID to impersonate for the operation. + --cache-dir='~/.kube/cache' + Default cache directory + --certificate-authority='' + Path to a cert file for the certificate authority + --client-certificate='' + Path to a client certificate file for TLS + --client-key='' + Path to a client key file for TLS + --cluster='' + The name of the kubeconfig cluster to use + --context='' + The name of the kubeconfig context to use + --insecure-skip-tls-verify=false + If true, the server`s certificate will not be checked for validity. This will make your + HTTPS connections insecure + --kubeconfig='' + Path to the kubeconfig file to use for CLI requests. + --match-server-version=false + Require server version to match client version + -n, --namespace='' + If present, the namespace scope for this CLI request + --password='' + Password for basic authentication to the API server + --profile='none' + Name of profile to capture. One of (none|cpu|heap|goroutine|threadcreate|block|mutex) + --profile-output='profile.pprof' + Name of the file to write the profile to + --request-timeout='0' + The length of time to wait before giving up on a single server request. Non-zero values + should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don`t + timeout requests. + -s, --server='' + The address and port of the Kubernetes API server + --tls-server-name='' + Server name to use for server certificate validation. If it is not provided, the + hostname used to contact the server is used + --token='' + Bearer token for authentication to the API server + --user='' + The name of the kubeconfig user to use + --username='' + Username for basic authentication to the API server + --warnings-as-errors=false + Treat warnings received from the server as errors and exit with a non-zero exit code +``` + diff --git a/docs/_includes/reference/cli/werf_kubectl_port_forward.short.md b/docs/_includes/reference/cli/werf_kubectl_port_forward.short.md new file mode 100644 index 0000000000..9129884a98 --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_port_forward.short.md @@ -0,0 +1 @@ +forward one or more local ports to a pod \ No newline at end of file diff --git a/docs/_includes/reference/cli/werf_kubectl_proxy.md b/docs/_includes/reference/cli/werf_kubectl_proxy.md new file mode 100644 index 0000000000..1d5c897d3e --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_proxy.md @@ -0,0 +1,132 @@ +{% if include.header %} +{% assign header = include.header %} +{% else %} +{% assign header = "###" %} +{% endif %} +Creates a proxy server or application-level gateway between localhost and the Kubernetes API server. It also allows serving static content over specified HTTP path. All incoming data enters through one port and gets forwarded to the remote Kubernetes API server port, except for the path matching the static content path. + +{{ header }} Syntax + +```shell +werf kubectl proxy [--port=PORT] [--www=static-dir] [--www-prefix=prefix] [--api-prefix=prefix] [options] +``` + +{{ header }} Examples + +```shell + # To proxy all of the Kubernetes API and nothing else + kubectl proxy --api-prefix=/ + + # To proxy only part of the Kubernetes API and also some static files + # You can get pods info with 'curl localhost:8001/api/v1/pods' + kubectl proxy --www=/my/files --www-prefix=/static/ --api-prefix=/api/ + + # To proxy the entire Kubernetes API at a different root + # You can get pods info with 'curl localhost:8001/custom/api/v1/pods' + kubectl proxy --api-prefix=/custom/ + + # Run a proxy to the Kubernetes API server on port 8011, serving static content from ./local/www/ + kubectl proxy --port=8011 --www=./local/www/ + + # Run a proxy to the Kubernetes API server on an arbitrary local port + # The chosen port for the server will be output to stdout + kubectl proxy --port=0 + + # Run a proxy to the Kubernetes API server, changing the API prefix to k8s-api + # This makes e.g. the pods API available at localhost:8001/k8s-api/v1/pods/ + kubectl proxy --api-prefix=/k8s-api +``` + +{{ header }} Options + +```shell + --accept-hosts='^localhost$,^127\.0\.0\.1$,^\[::1\]$' + Regular expression for hosts that the proxy should accept. + --accept-paths='^.*' + Regular expression for paths that the proxy should accept. + --address='127.0.0.1' + The IP address on which to serve on. + --api-prefix='/' + Prefix to serve the proxied API under. + --append-server-path=false + If true, enables automatic path appending of the kube context server path to each + request. + --disable-filter=false + If true, disable request filtering in the proxy. This is dangerous, and can leave you + vulnerable to XSRF attacks, when used with an accessible port. + --keepalive=0s + keepalive specifies the keep-alive period for an active network connection. Set to 0 to + disable keepalive. + -p, --port=8001 + The port on which to run the proxy. Set to 0 to pick a random port. + --reject-methods='^$' + Regular expression for HTTP methods that the proxy should reject (example + --reject-methods=`POST,PUT,PATCH`). + --reject-paths='^/api/.*/pods/.*/exec,^/api/.*/pods/.*/attach' + Regular expression for paths that the proxy should reject. Paths specified here will be + rejected even accepted by --accept-paths. + -u, --unix-socket='' + Unix socket on which to run the proxy. + -w, --www='' + Also serve static files from the given directory under the specified prefix. + -P, --www-prefix='/static/' + Prefix to serve static files under, if static file directory is specified. +``` + +{{ header }} Options inherited from parent commands + +```shell + --as='' + Username to impersonate for the operation. User could be a regular user or a service + account in a namespace. + --as-group=[] + Group to impersonate for the operation, this flag can be repeated to specify multiple + groups. + --as-uid='' + UID to impersonate for the operation. + --cache-dir='~/.kube/cache' + Default cache directory + --certificate-authority='' + Path to a cert file for the certificate authority + --client-certificate='' + Path to a client certificate file for TLS + --client-key='' + Path to a client key file for TLS + --cluster='' + The name of the kubeconfig cluster to use + --context='' + The name of the kubeconfig context to use + --insecure-skip-tls-verify=false + If true, the server`s certificate will not be checked for validity. This will make your + HTTPS connections insecure + --kubeconfig='' + Path to the kubeconfig file to use for CLI requests. + --match-server-version=false + Require server version to match client version + -n, --namespace='' + If present, the namespace scope for this CLI request + --password='' + Password for basic authentication to the API server + --profile='none' + Name of profile to capture. One of (none|cpu|heap|goroutine|threadcreate|block|mutex) + --profile-output='profile.pprof' + Name of the file to write the profile to + --request-timeout='0' + The length of time to wait before giving up on a single server request. Non-zero values + should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don`t + timeout requests. + -s, --server='' + The address and port of the Kubernetes API server + --tls-server-name='' + Server name to use for server certificate validation. If it is not provided, the + hostname used to contact the server is used + --token='' + Bearer token for authentication to the API server + --user='' + The name of the kubeconfig user to use + --username='' + Username for basic authentication to the API server + --warnings-as-errors=false + Treat warnings received from the server as errors and exit with a non-zero exit code +``` + diff --git a/docs/_includes/reference/cli/werf_kubectl_proxy.short.md b/docs/_includes/reference/cli/werf_kubectl_proxy.short.md new file mode 100644 index 0000000000..6c9a467b10 --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_proxy.short.md @@ -0,0 +1 @@ +run a proxy to the Kubernetes API server \ No newline at end of file diff --git a/docs/_includes/reference/cli/werf_kubectl_replace.md b/docs/_includes/reference/cli/werf_kubectl_replace.md new file mode 100644 index 0000000000..60d575759c --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_replace.md @@ -0,0 +1,145 @@ +{% if include.header %} +{% assign header = include.header %} +{% else %} +{% assign header = "###" %} +{% endif %} +Replace a resource by file name or stdin. + + JSON and YAML formats are accepted. If replacing an existing resource, the complete resource spec must be provided. This can be obtained by + + $ kubectl get TYPE NAME -o yaml + +{{ header }} Syntax + +```shell +werf kubectl replace -f FILENAME [options] +``` + +{{ header }} Examples + +```shell + # Replace a pod using the data in pod.json + kubectl replace -f ./pod.json + + # Replace a pod based on the JSON passed into stdin + cat pod.json | kubectl replace -f - + + # Update a single-container pod's image version (tag) to v4 + kubectl get pod mypod -o yaml | sed 's/\(image: myimage\):.*$/\1:v4/' | kubectl replace -f - + + # Force replace, delete and then re-create the resource + kubectl replace --force -f ./pod.json +``` + +{{ header }} Options + +```shell + --allow-missing-template-keys=true + If true, ignore any errors in templates when a field or map key is missing in the + template. Only applies to golang and jsonpath output formats. + --cascade='background' + Must be "background", "orphan", or "foreground". Selects the deletion cascading + strategy for the dependents (e.g. Pods created by a ReplicationController). Defaults to + background. + --dry-run='none' + Must be "none", "server", or "client". If client strategy, only print the object that + would be sent, without sending it. If server strategy, submit server-side request + without persisting the resource. + --field-manager='kubectl-replace' + Name of the manager used to track field ownership. + -f, --filename=[] + to use to replace the resource. + --force=false + If true, immediately remove resources from API and bypass graceful deletion. Note that + immediate deletion of some resources may result in inconsistency or data loss and + requires confirmation. + --grace-period=-1 + Period of time in seconds given to the resource to terminate gracefully. Ignored if + negative. Set to 1 for immediate shutdown. Can only be set to 0 when --force is true + (force deletion). + -k, --kustomize='' + Process a kustomization directory. This flag can`t be used together with -f or -R. + -o, --output='' + Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile + |jsonpath|jsonpath-as-json|jsonpath-file. + --raw='' + Raw URI to PUT to the server. Uses the transport specified by the kubeconfig file. + -R, --recursive=false + Process the directory used in -f, --filename recursively. Useful when you want to + manage related manifests organized within the same directory. + --save-config=false + If true, the configuration of current object will be saved in its annotation. + Otherwise, the annotation will be unchanged. This flag is useful when you want to + perform kubectl apply on this object in the future. + --show-managed-fields=false + If true, keep the managedFields when printing objects in JSON or YAML format. + --template='' + Template string or path to template file to use when -o=go-template, + -o=go-template-file. The template format is golang templates + [http://golang.org/pkg/text/template/#pkg-overview]. + --timeout=0s + The length of time to wait before giving up on a delete, zero means determine a timeout + from the size of the object + --validate=true + If true, use a schema to validate the input before sending it + --wait=false + If true, wait for resources to be gone before returning. This waits for finalizers. +``` + +{{ header }} Options inherited from parent commands + +```shell + --as='' + Username to impersonate for the operation. User could be a regular user or a service + account in a namespace. + --as-group=[] + Group to impersonate for the operation, this flag can be repeated to specify multiple + groups. + --as-uid='' + UID to impersonate for the operation. + --cache-dir='~/.kube/cache' + Default cache directory + --certificate-authority='' + Path to a cert file for the certificate authority + --client-certificate='' + Path to a client certificate file for TLS + --client-key='' + Path to a client key file for TLS + --cluster='' + The name of the kubeconfig cluster to use + --context='' + The name of the kubeconfig context to use + --insecure-skip-tls-verify=false + If true, the server`s certificate will not be checked for validity. This will make your + HTTPS connections insecure + --kubeconfig='' + Path to the kubeconfig file to use for CLI requests. + --match-server-version=false + Require server version to match client version + -n, --namespace='' + If present, the namespace scope for this CLI request + --password='' + Password for basic authentication to the API server + --profile='none' + Name of profile to capture. One of (none|cpu|heap|goroutine|threadcreate|block|mutex) + --profile-output='profile.pprof' + Name of the file to write the profile to + --request-timeout='0' + The length of time to wait before giving up on a single server request. Non-zero values + should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don`t + timeout requests. + -s, --server='' + The address and port of the Kubernetes API server + --tls-server-name='' + Server name to use for server certificate validation. If it is not provided, the + hostname used to contact the server is used + --token='' + Bearer token for authentication to the API server + --user='' + The name of the kubeconfig user to use + --username='' + Username for basic authentication to the API server + --warnings-as-errors=false + Treat warnings received from the server as errors and exit with a non-zero exit code +``` + diff --git a/docs/_includes/reference/cli/werf_kubectl_replace.short.md b/docs/_includes/reference/cli/werf_kubectl_replace.short.md new file mode 100644 index 0000000000..c573f92680 --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_replace.short.md @@ -0,0 +1 @@ +replace a resource by file name or stdin \ No newline at end of file diff --git a/docs/_includes/reference/cli/werf_kubectl_rollout.md b/docs/_includes/reference/cli/werf_kubectl_rollout.md new file mode 100644 index 0000000000..22c38fc0d7 --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_rollout.md @@ -0,0 +1,86 @@ +{% if include.header %} +{% assign header = include.header %} +{% else %} +{% assign header = "###" %} +{% endif %} +Manage the rollout of a resource. + + Valid resource types include: + + * deployments + * daemonsets + * statefulsets + +{{ header }} Syntax + +```shell +werf kubectl rollout SUBCOMMAND +``` + +{{ header }} Examples + +```shell + # Rollback to the previous deployment + kubectl rollout undo deployment/abc + + # Check the rollout status of a daemonset + kubectl rollout status daemonset/foo +``` + +{{ header }} Options inherited from parent commands + +```shell + --as='' + Username to impersonate for the operation. User could be a regular user or a service + account in a namespace. + --as-group=[] + Group to impersonate for the operation, this flag can be repeated to specify multiple + groups. + --as-uid='' + UID to impersonate for the operation. + --cache-dir='~/.kube/cache' + Default cache directory + --certificate-authority='' + Path to a cert file for the certificate authority + --client-certificate='' + Path to a client certificate file for TLS + --client-key='' + Path to a client key file for TLS + --cluster='' + The name of the kubeconfig cluster to use + --context='' + The name of the kubeconfig context to use + --insecure-skip-tls-verify=false + If true, the server`s certificate will not be checked for validity. This will make your + HTTPS connections insecure + --kubeconfig='' + Path to the kubeconfig file to use for CLI requests. + --match-server-version=false + Require server version to match client version + -n, --namespace='' + If present, the namespace scope for this CLI request + --password='' + Password for basic authentication to the API server + --profile='none' + Name of profile to capture. One of (none|cpu|heap|goroutine|threadcreate|block|mutex) + --profile-output='profile.pprof' + Name of the file to write the profile to + --request-timeout='0' + The length of time to wait before giving up on a single server request. Non-zero values + should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don`t + timeout requests. + -s, --server='' + The address and port of the Kubernetes API server + --tls-server-name='' + Server name to use for server certificate validation. If it is not provided, the + hostname used to contact the server is used + --token='' + Bearer token for authentication to the API server + --user='' + The name of the kubeconfig user to use + --username='' + Username for basic authentication to the API server + --warnings-as-errors=false + Treat warnings received from the server as errors and exit with a non-zero exit code +``` + diff --git a/docs/_includes/reference/cli/werf_kubectl_rollout.short.md b/docs/_includes/reference/cli/werf_kubectl_rollout.short.md new file mode 100644 index 0000000000..2799bd34dd --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_rollout.short.md @@ -0,0 +1 @@ +manage the rollout of a resource \ No newline at end of file diff --git a/docs/_includes/reference/cli/werf_kubectl_rollout_history.md b/docs/_includes/reference/cli/werf_kubectl_rollout_history.md new file mode 100644 index 0000000000..ed4fad2512 --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_rollout_history.md @@ -0,0 +1,106 @@ +{% if include.header %} +{% assign header = include.header %} +{% else %} +{% assign header = "###" %} +{% endif %} +View previous rollout revisions and configurations. + +{{ header }} Syntax + +```shell +werf kubectl rollout history (TYPE NAME | TYPE/NAME) [flags] [options] +``` + +{{ header }} Examples + +```shell + # View the rollout history of a deployment + kubectl rollout history deployment/abc + + # View the details of daemonset revision 3 + kubectl rollout history daemonset/abc --revision=3 +``` + +{{ header }} Options + +```shell + --allow-missing-template-keys=true + If true, ignore any errors in templates when a field or map key is missing in the + template. Only applies to golang and jsonpath output formats. + -f, --filename=[] + Filename, directory, or URL to files identifying the resource to get from a server. + -k, --kustomize='' + Process the kustomization directory. This flag can`t be used together with -f or -R. + -o, --output='' + Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile + |jsonpath|jsonpath-as-json|jsonpath-file. + -R, --recursive=false + Process the directory used in -f, --filename recursively. Useful when you want to + manage related manifests organized within the same directory. + --revision=0 + See the details, including podTemplate of the revision specified + --show-managed-fields=false + If true, keep the managedFields when printing objects in JSON or YAML format. + --template='' + Template string or path to template file to use when -o=go-template, + -o=go-template-file. The template format is golang templates + [http://golang.org/pkg/text/template/#pkg-overview]. +``` + +{{ header }} Options inherited from parent commands + +```shell + --as='' + Username to impersonate for the operation. User could be a regular user or a service + account in a namespace. + --as-group=[] + Group to impersonate for the operation, this flag can be repeated to specify multiple + groups. + --as-uid='' + UID to impersonate for the operation. + --cache-dir='~/.kube/cache' + Default cache directory + --certificate-authority='' + Path to a cert file for the certificate authority + --client-certificate='' + Path to a client certificate file for TLS + --client-key='' + Path to a client key file for TLS + --cluster='' + The name of the kubeconfig cluster to use + --context='' + The name of the kubeconfig context to use + --insecure-skip-tls-verify=false + If true, the server`s certificate will not be checked for validity. This will make your + HTTPS connections insecure + --kubeconfig='' + Path to the kubeconfig file to use for CLI requests. + --match-server-version=false + Require server version to match client version + -n, --namespace='' + If present, the namespace scope for this CLI request + --password='' + Password for basic authentication to the API server + --profile='none' + Name of profile to capture. One of (none|cpu|heap|goroutine|threadcreate|block|mutex) + --profile-output='profile.pprof' + Name of the file to write the profile to + --request-timeout='0' + The length of time to wait before giving up on a single server request. Non-zero values + should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don`t + timeout requests. + -s, --server='' + The address and port of the Kubernetes API server + --tls-server-name='' + Server name to use for server certificate validation. If it is not provided, the + hostname used to contact the server is used + --token='' + Bearer token for authentication to the API server + --user='' + The name of the kubeconfig user to use + --username='' + Username for basic authentication to the API server + --warnings-as-errors=false + Treat warnings received from the server as errors and exit with a non-zero exit code +``` + diff --git a/docs/_includes/reference/cli/werf_kubectl_rollout_history.short.md b/docs/_includes/reference/cli/werf_kubectl_rollout_history.short.md new file mode 100644 index 0000000000..691e904b0a --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_rollout_history.short.md @@ -0,0 +1 @@ +view rollout history \ No newline at end of file diff --git a/docs/_includes/reference/cli/werf_kubectl_rollout_pause.md b/docs/_includes/reference/cli/werf_kubectl_rollout_pause.md new file mode 100644 index 0000000000..7444941489 --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_rollout_pause.md @@ -0,0 +1,107 @@ +{% if include.header %} +{% assign header = include.header %} +{% else %} +{% assign header = "###" %} +{% endif %} +Mark the provided resource as paused. + + Paused resources will not be reconciled by a controller. Use "kubectl rollout resume" to resume a paused resource. Currently only deployments support being paused. + +{{ header }} Syntax + +```shell +werf kubectl rollout pause RESOURCE [options] +``` + +{{ header }} Examples + +```shell + # Mark the nginx deployment as paused + # Any current state of the deployment will continue its function; new updates + # to the deployment will not have an effect as long as the deployment is paused + kubectl rollout pause deployment/nginx +``` + +{{ header }} Options + +```shell + --allow-missing-template-keys=true + If true, ignore any errors in templates when a field or map key is missing in the + template. Only applies to golang and jsonpath output formats. + --field-manager='kubectl-rollout' + Name of the manager used to track field ownership. + -f, --filename=[] + Filename, directory, or URL to files identifying the resource to get from a server. + -k, --kustomize='' + Process the kustomization directory. This flag can`t be used together with -f or -R. + -o, --output='' + Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile + |jsonpath|jsonpath-as-json|jsonpath-file. + -R, --recursive=false + Process the directory used in -f, --filename recursively. Useful when you want to + manage related manifests organized within the same directory. + --show-managed-fields=false + If true, keep the managedFields when printing objects in JSON or YAML format. + --template='' + Template string or path to template file to use when -o=go-template, + -o=go-template-file. The template format is golang templates + [http://golang.org/pkg/text/template/#pkg-overview]. +``` + +{{ header }} Options inherited from parent commands + +```shell + --as='' + Username to impersonate for the operation. User could be a regular user or a service + account in a namespace. + --as-group=[] + Group to impersonate for the operation, this flag can be repeated to specify multiple + groups. + --as-uid='' + UID to impersonate for the operation. + --cache-dir='~/.kube/cache' + Default cache directory + --certificate-authority='' + Path to a cert file for the certificate authority + --client-certificate='' + Path to a client certificate file for TLS + --client-key='' + Path to a client key file for TLS + --cluster='' + The name of the kubeconfig cluster to use + --context='' + The name of the kubeconfig context to use + --insecure-skip-tls-verify=false + If true, the server`s certificate will not be checked for validity. This will make your + HTTPS connections insecure + --kubeconfig='' + Path to the kubeconfig file to use for CLI requests. + --match-server-version=false + Require server version to match client version + -n, --namespace='' + If present, the namespace scope for this CLI request + --password='' + Password for basic authentication to the API server + --profile='none' + Name of profile to capture. One of (none|cpu|heap|goroutine|threadcreate|block|mutex) + --profile-output='profile.pprof' + Name of the file to write the profile to + --request-timeout='0' + The length of time to wait before giving up on a single server request. Non-zero values + should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don`t + timeout requests. + -s, --server='' + The address and port of the Kubernetes API server + --tls-server-name='' + Server name to use for server certificate validation. If it is not provided, the + hostname used to contact the server is used + --token='' + Bearer token for authentication to the API server + --user='' + The name of the kubeconfig user to use + --username='' + Username for basic authentication to the API server + --warnings-as-errors=false + Treat warnings received from the server as errors and exit with a non-zero exit code +``` + diff --git a/docs/_includes/reference/cli/werf_kubectl_rollout_pause.short.md b/docs/_includes/reference/cli/werf_kubectl_rollout_pause.short.md new file mode 100644 index 0000000000..d863b11526 --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_rollout_pause.short.md @@ -0,0 +1 @@ +mark the provided resource as paused \ No newline at end of file diff --git a/docs/_includes/reference/cli/werf_kubectl_rollout_restart.md b/docs/_includes/reference/cli/werf_kubectl_rollout_restart.md new file mode 100644 index 0000000000..69aebc9f2f --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_rollout_restart.md @@ -0,0 +1,108 @@ +{% if include.header %} +{% assign header = include.header %} +{% else %} +{% assign header = "###" %} +{% endif %} +Restart a resource. + + Resource rollout will be restarted. + +{{ header }} Syntax + +```shell +werf kubectl rollout restart RESOURCE [options] +``` + +{{ header }} Examples + +```shell + # Restart a deployment + kubectl rollout restart deployment/nginx + + # Restart a daemon set + kubectl rollout restart daemonset/abc +``` + +{{ header }} Options + +```shell + --allow-missing-template-keys=true + If true, ignore any errors in templates when a field or map key is missing in the + template. Only applies to golang and jsonpath output formats. + --field-manager='kubectl-rollout' + Name of the manager used to track field ownership. + -f, --filename=[] + Filename, directory, or URL to files identifying the resource to get from a server. + -k, --kustomize='' + Process the kustomization directory. This flag can`t be used together with -f or -R. + -o, --output='' + Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile + |jsonpath|jsonpath-as-json|jsonpath-file. + -R, --recursive=false + Process the directory used in -f, --filename recursively. Useful when you want to + manage related manifests organized within the same directory. + --show-managed-fields=false + If true, keep the managedFields when printing objects in JSON or YAML format. + --template='' + Template string or path to template file to use when -o=go-template, + -o=go-template-file. The template format is golang templates + [http://golang.org/pkg/text/template/#pkg-overview]. +``` + +{{ header }} Options inherited from parent commands + +```shell + --as='' + Username to impersonate for the operation. User could be a regular user or a service + account in a namespace. + --as-group=[] + Group to impersonate for the operation, this flag can be repeated to specify multiple + groups. + --as-uid='' + UID to impersonate for the operation. + --cache-dir='~/.kube/cache' + Default cache directory + --certificate-authority='' + Path to a cert file for the certificate authority + --client-certificate='' + Path to a client certificate file for TLS + --client-key='' + Path to a client key file for TLS + --cluster='' + The name of the kubeconfig cluster to use + --context='' + The name of the kubeconfig context to use + --insecure-skip-tls-verify=false + If true, the server`s certificate will not be checked for validity. This will make your + HTTPS connections insecure + --kubeconfig='' + Path to the kubeconfig file to use for CLI requests. + --match-server-version=false + Require server version to match client version + -n, --namespace='' + If present, the namespace scope for this CLI request + --password='' + Password for basic authentication to the API server + --profile='none' + Name of profile to capture. One of (none|cpu|heap|goroutine|threadcreate|block|mutex) + --profile-output='profile.pprof' + Name of the file to write the profile to + --request-timeout='0' + The length of time to wait before giving up on a single server request. Non-zero values + should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don`t + timeout requests. + -s, --server='' + The address and port of the Kubernetes API server + --tls-server-name='' + Server name to use for server certificate validation. If it is not provided, the + hostname used to contact the server is used + --token='' + Bearer token for authentication to the API server + --user='' + The name of the kubeconfig user to use + --username='' + Username for basic authentication to the API server + --warnings-as-errors=false + Treat warnings received from the server as errors and exit with a non-zero exit code +``` + diff --git a/docs/_includes/reference/cli/werf_kubectl_rollout_restart.short.md b/docs/_includes/reference/cli/werf_kubectl_rollout_restart.short.md new file mode 100644 index 0000000000..77ba30350d --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_rollout_restart.short.md @@ -0,0 +1 @@ +restart a resource \ No newline at end of file diff --git a/docs/_includes/reference/cli/werf_kubectl_rollout_resume.md b/docs/_includes/reference/cli/werf_kubectl_rollout_resume.md new file mode 100644 index 0000000000..a2240453fd --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_rollout_resume.md @@ -0,0 +1,105 @@ +{% if include.header %} +{% assign header = include.header %} +{% else %} +{% assign header = "###" %} +{% endif %} +Resume a paused resource. + + Paused resources will not be reconciled by a controller. By resuming a resource, we allow it to be reconciled again. Currently only deployments support being resumed. + +{{ header }} Syntax + +```shell +werf kubectl rollout resume RESOURCE [options] +``` + +{{ header }} Examples + +```shell + # Resume an already paused deployment + kubectl rollout resume deployment/nginx +``` + +{{ header }} Options + +```shell + --allow-missing-template-keys=true + If true, ignore any errors in templates when a field or map key is missing in the + template. Only applies to golang and jsonpath output formats. + --field-manager='kubectl-rollout' + Name of the manager used to track field ownership. + -f, --filename=[] + Filename, directory, or URL to files identifying the resource to get from a server. + -k, --kustomize='' + Process the kustomization directory. This flag can`t be used together with -f or -R. + -o, --output='' + Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile + |jsonpath|jsonpath-as-json|jsonpath-file. + -R, --recursive=false + Process the directory used in -f, --filename recursively. Useful when you want to + manage related manifests organized within the same directory. + --show-managed-fields=false + If true, keep the managedFields when printing objects in JSON or YAML format. + --template='' + Template string or path to template file to use when -o=go-template, + -o=go-template-file. The template format is golang templates + [http://golang.org/pkg/text/template/#pkg-overview]. +``` + +{{ header }} Options inherited from parent commands + +```shell + --as='' + Username to impersonate for the operation. User could be a regular user or a service + account in a namespace. + --as-group=[] + Group to impersonate for the operation, this flag can be repeated to specify multiple + groups. + --as-uid='' + UID to impersonate for the operation. + --cache-dir='~/.kube/cache' + Default cache directory + --certificate-authority='' + Path to a cert file for the certificate authority + --client-certificate='' + Path to a client certificate file for TLS + --client-key='' + Path to a client key file for TLS + --cluster='' + The name of the kubeconfig cluster to use + --context='' + The name of the kubeconfig context to use + --insecure-skip-tls-verify=false + If true, the server`s certificate will not be checked for validity. This will make your + HTTPS connections insecure + --kubeconfig='' + Path to the kubeconfig file to use for CLI requests. + --match-server-version=false + Require server version to match client version + -n, --namespace='' + If present, the namespace scope for this CLI request + --password='' + Password for basic authentication to the API server + --profile='none' + Name of profile to capture. One of (none|cpu|heap|goroutine|threadcreate|block|mutex) + --profile-output='profile.pprof' + Name of the file to write the profile to + --request-timeout='0' + The length of time to wait before giving up on a single server request. Non-zero values + should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don`t + timeout requests. + -s, --server='' + The address and port of the Kubernetes API server + --tls-server-name='' + Server name to use for server certificate validation. If it is not provided, the + hostname used to contact the server is used + --token='' + Bearer token for authentication to the API server + --user='' + The name of the kubeconfig user to use + --username='' + Username for basic authentication to the API server + --warnings-as-errors=false + Treat warnings received from the server as errors and exit with a non-zero exit code +``` + diff --git a/docs/_includes/reference/cli/werf_kubectl_rollout_resume.short.md b/docs/_includes/reference/cli/werf_kubectl_rollout_resume.short.md new file mode 100644 index 0000000000..0d7667cf3f --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_rollout_resume.short.md @@ -0,0 +1 @@ +resume a paused resource \ No newline at end of file diff --git a/docs/_includes/reference/cli/werf_kubectl_rollout_status.md b/docs/_includes/reference/cli/werf_kubectl_rollout_status.md new file mode 100644 index 0000000000..ba795989ad --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_rollout_status.md @@ -0,0 +1,98 @@ +{% if include.header %} +{% assign header = include.header %} +{% else %} +{% assign header = "###" %} +{% endif %} +Show the status of the rollout. + + By default 'rollout status' will watch the status of the latest rollout until it's done. If you don't want to wait for the rollout to finish then you can use --watch=false. Note that if a new rollout starts in-between, then 'rollout status' will continue watching the latest revision. If you want to pin to a specific revision and abort if it is rolled over by another revision, use --revision=N where N is the revision you need to watch for. + +{{ header }} Syntax + +```shell +werf kubectl rollout status (TYPE NAME | TYPE/NAME) [flags] [options] +``` + +{{ header }} Examples + +```shell + # Watch the rollout status of a deployment + kubectl rollout status deployment/nginx +``` + +{{ header }} Options + +```shell + -f, --filename=[] + Filename, directory, or URL to files identifying the resource to get from a server. + -k, --kustomize='' + Process the kustomization directory. This flag can`t be used together with -f or -R. + -R, --recursive=false + Process the directory used in -f, --filename recursively. Useful when you want to + manage related manifests organized within the same directory. + --revision=0 + Pin to a specific revision for showing its status. Defaults to 0 (last revision). + --timeout=0s + The length of time to wait before ending watch, zero means never. Any other values + should contain a corresponding time unit (e.g. 1s, 2m, 3h). + -w, --watch=true + Watch the status of the rollout until it`s done. +``` + +{{ header }} Options inherited from parent commands + +```shell + --as='' + Username to impersonate for the operation. User could be a regular user or a service + account in a namespace. + --as-group=[] + Group to impersonate for the operation, this flag can be repeated to specify multiple + groups. + --as-uid='' + UID to impersonate for the operation. + --cache-dir='~/.kube/cache' + Default cache directory + --certificate-authority='' + Path to a cert file for the certificate authority + --client-certificate='' + Path to a client certificate file for TLS + --client-key='' + Path to a client key file for TLS + --cluster='' + The name of the kubeconfig cluster to use + --context='' + The name of the kubeconfig context to use + --insecure-skip-tls-verify=false + If true, the server`s certificate will not be checked for validity. This will make your + HTTPS connections insecure + --kubeconfig='' + Path to the kubeconfig file to use for CLI requests. + --match-server-version=false + Require server version to match client version + -n, --namespace='' + If present, the namespace scope for this CLI request + --password='' + Password for basic authentication to the API server + --profile='none' + Name of profile to capture. One of (none|cpu|heap|goroutine|threadcreate|block|mutex) + --profile-output='profile.pprof' + Name of the file to write the profile to + --request-timeout='0' + The length of time to wait before giving up on a single server request. Non-zero values + should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don`t + timeout requests. + -s, --server='' + The address and port of the Kubernetes API server + --tls-server-name='' + Server name to use for server certificate validation. If it is not provided, the + hostname used to contact the server is used + --token='' + Bearer token for authentication to the API server + --user='' + The name of the kubeconfig user to use + --username='' + Username for basic authentication to the API server + --warnings-as-errors=false + Treat warnings received from the server as errors and exit with a non-zero exit code +``` + diff --git a/docs/_includes/reference/cli/werf_kubectl_rollout_status.short.md b/docs/_includes/reference/cli/werf_kubectl_rollout_status.short.md new file mode 100644 index 0000000000..874e7b6c12 --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_rollout_status.short.md @@ -0,0 +1 @@ +show the status of the rollout \ No newline at end of file diff --git a/docs/_includes/reference/cli/werf_kubectl_rollout_undo.md b/docs/_includes/reference/cli/werf_kubectl_rollout_undo.md new file mode 100644 index 0000000000..31e0a4e549 --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_rollout_undo.md @@ -0,0 +1,113 @@ +{% if include.header %} +{% assign header = include.header %} +{% else %} +{% assign header = "###" %} +{% endif %} +Roll back to a previous rollout. + +{{ header }} Syntax + +```shell +werf kubectl rollout undo (TYPE NAME | TYPE/NAME) [flags] [options] +``` + +{{ header }} Examples + +```shell + # Roll back to the previous deployment + kubectl rollout undo deployment/abc + + # Roll back to daemonset revision 3 + kubectl rollout undo daemonset/abc --to-revision=3 + + # Roll back to the previous deployment with dry-run + kubectl rollout undo --dry-run=server deployment/abc +``` + +{{ header }} Options + +```shell + --allow-missing-template-keys=true + If true, ignore any errors in templates when a field or map key is missing in the + template. Only applies to golang and jsonpath output formats. + --dry-run='none' + Must be "none", "server", or "client". If client strategy, only print the object that + would be sent, without sending it. If server strategy, submit server-side request + without persisting the resource. + -f, --filename=[] + Filename, directory, or URL to files identifying the resource to get from a server. + -k, --kustomize='' + Process the kustomization directory. This flag can`t be used together with -f or -R. + -o, --output='' + Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile + |jsonpath|jsonpath-as-json|jsonpath-file. + -R, --recursive=false + Process the directory used in -f, --filename recursively. Useful when you want to + manage related manifests organized within the same directory. + --show-managed-fields=false + If true, keep the managedFields when printing objects in JSON or YAML format. + --template='' + Template string or path to template file to use when -o=go-template, + -o=go-template-file. The template format is golang templates + [http://golang.org/pkg/text/template/#pkg-overview]. + --to-revision=0 + The revision to rollback to. Default to 0 (last revision). +``` + +{{ header }} Options inherited from parent commands + +```shell + --as='' + Username to impersonate for the operation. User could be a regular user or a service + account in a namespace. + --as-group=[] + Group to impersonate for the operation, this flag can be repeated to specify multiple + groups. + --as-uid='' + UID to impersonate for the operation. + --cache-dir='~/.kube/cache' + Default cache directory + --certificate-authority='' + Path to a cert file for the certificate authority + --client-certificate='' + Path to a client certificate file for TLS + --client-key='' + Path to a client key file for TLS + --cluster='' + The name of the kubeconfig cluster to use + --context='' + The name of the kubeconfig context to use + --insecure-skip-tls-verify=false + If true, the server`s certificate will not be checked for validity. This will make your + HTTPS connections insecure + --kubeconfig='' + Path to the kubeconfig file to use for CLI requests. + --match-server-version=false + Require server version to match client version + -n, --namespace='' + If present, the namespace scope for this CLI request + --password='' + Password for basic authentication to the API server + --profile='none' + Name of profile to capture. One of (none|cpu|heap|goroutine|threadcreate|block|mutex) + --profile-output='profile.pprof' + Name of the file to write the profile to + --request-timeout='0' + The length of time to wait before giving up on a single server request. Non-zero values + should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don`t + timeout requests. + -s, --server='' + The address and port of the Kubernetes API server + --tls-server-name='' + Server name to use for server certificate validation. If it is not provided, the + hostname used to contact the server is used + --token='' + Bearer token for authentication to the API server + --user='' + The name of the kubeconfig user to use + --username='' + Username for basic authentication to the API server + --warnings-as-errors=false + Treat warnings received from the server as errors and exit with a non-zero exit code +``` + diff --git a/docs/_includes/reference/cli/werf_kubectl_rollout_undo.short.md b/docs/_includes/reference/cli/werf_kubectl_rollout_undo.short.md new file mode 100644 index 0000000000..830754951a --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_rollout_undo.short.md @@ -0,0 +1 @@ +undo a previous rollout \ No newline at end of file diff --git a/docs/_includes/reference/cli/werf_kubectl_run.md b/docs/_includes/reference/cli/werf_kubectl_run.md new file mode 100644 index 0000000000..b4034fc7b5 --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_run.md @@ -0,0 +1,200 @@ +{% if include.header %} +{% assign header = include.header %} +{% else %} +{% assign header = "###" %} +{% endif %} +Create and run a particular image in a pod. + +{{ header }} Syntax + +```shell +werf kubectl run NAME --image=image [--env="key=value"] [--port=port] [--dry-run=server|client] [--overrides=inline-json] [--command] -- [COMMAND] [args...] [options] +``` + +{{ header }} Examples + +```shell + # Start a nginx pod + kubectl run nginx --image=nginx + + # Start a hazelcast pod and let the container expose port 5701 + kubectl run hazelcast --image=hazelcast/hazelcast --port=5701 + + # Start a hazelcast pod and set environment variables "DNS_DOMAIN=cluster" and "POD_NAMESPACE=default" in the container + kubectl run hazelcast --image=hazelcast/hazelcast --env="DNS_DOMAIN=cluster" --env="POD_NAMESPACE=default" + + # Start a hazelcast pod and set labels "app=hazelcast" and "env=prod" in the container + kubectl run hazelcast --image=hazelcast/hazelcast --labels="app=hazelcast,env=prod" + + # Dry run; print the corresponding API objects without creating them + kubectl run nginx --image=nginx --dry-run=client + + # Start a nginx pod, but overload the spec with a partial set of values parsed from JSON + kubectl run nginx --image=nginx --overrides='{ "apiVersion": "v1", "spec": { ... } }' + + # Start a busybox pod and keep it in the foreground, don't restart it if it exits + kubectl run -i -t busybox --image=busybox --restart=Never + + # Start the nginx pod using the default command, but use custom arguments (arg1 .. argN) for that command + kubectl run nginx --image=nginx -- ... + + # Start the nginx pod using a different command and custom arguments + kubectl run nginx --image=nginx --command -- ... +``` + +{{ header }} Options + +```shell + --allow-missing-template-keys=true + If true, ignore any errors in templates when a field or map key is missing in the + template. Only applies to golang and jsonpath output formats. + --annotations=[] + Annotations to apply to the pod. + --attach=false + If true, wait for the Pod to start running, and then attach to the Pod as if `kubectl + attach ...` were called. Default false, unless `-i/--stdin` is set, in which case the + default is true. With `--restart=Never` the exit code of the container process is + returned. + --cascade='background' + Must be "background", "orphan", or "foreground". Selects the deletion cascading + strategy for the dependents (e.g. Pods created by a ReplicationController). Defaults to + background. + --command=false + If true and extra arguments are present, use them as the `command` field in the + container, rather than the `args` field which is the default. + --dry-run='none' + Must be "none", "server", or "client". If client strategy, only print the object that + would be sent, without sending it. If server strategy, submit server-side request + without persisting the resource. + --env=[] + Environment variables to set in the container. + --expose=false + If true, create a ClusterIP service associated with the pod. Requires `--port`. + --field-manager='kubectl-run' + Name of the manager used to track field ownership. + -f, --filename=[] + to use to replace the resource. + --force=false + If true, immediately remove resources from API and bypass graceful deletion. Note that + immediate deletion of some resources may result in inconsistency or data loss and + requires confirmation. + --grace-period=-1 + Period of time in seconds given to the resource to terminate gracefully. Ignored if + negative. Set to 1 for immediate shutdown. Can only be set to 0 when --force is true + (force deletion). + --image='' + The image for the container to run. + --image-pull-policy='' + The image pull policy for the container. If left empty, this value will not be + specified by the client and defaulted by the server. + -k, --kustomize='' + Process a kustomization directory. This flag can`t be used together with -f or -R. + -l, --labels='' + Comma separated labels to apply to the pod. Will override previous values. + --leave-stdin-open=false + If the pod is started in interactive mode or with stdin, leave stdin open after the + first attach completes. By default, stdin will be closed after the first attach + completes. + -o, --output='' + Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile + |jsonpath|jsonpath-as-json|jsonpath-file. + --override-type='merge' + The method used to override the generated object: json, merge, or strategic. + --overrides='' + An inline JSON override for the generated object. If this is non-empty, it is used to + override the generated object. Requires that the object supply a valid apiVersion field. + --pod-running-timeout=1m0s + The length of time (like 5s, 2m, or 3h, higher than zero) to wait until at least one + pod is running + --port='' + The port that this container exposes. + --privileged=false + If true, run the container in privileged mode. + -q, --quiet=false + If true, suppress prompt messages. + -R, --recursive=false + Process the directory used in -f, --filename recursively. Useful when you want to + manage related manifests organized within the same directory. + --restart='Always' + The restart policy for this Pod. Legal values [Always, OnFailure, Never]. + --rm=false + If true, delete the pod after it exits. Only valid when attaching to the container, + e.g. with `--attach` or with `-i/--stdin`. + --save-config=false + If true, the configuration of current object will be saved in its annotation. + Otherwise, the annotation will be unchanged. This flag is useful when you want to + perform kubectl apply on this object in the future. + --show-managed-fields=false + If true, keep the managedFields when printing objects in JSON or YAML format. + -i, --stdin=false + Keep stdin open on the container in the pod, even if nothing is attached. + --template='' + Template string or path to template file to use when -o=go-template, + -o=go-template-file. The template format is golang templates + [http://golang.org/pkg/text/template/#pkg-overview]. + --timeout=0s + The length of time to wait before giving up on a delete, zero means determine a timeout + from the size of the object + -t, --tty=false + Allocate a TTY for the container in the pod. + --wait=false + If true, wait for resources to be gone before returning. This waits for finalizers. +``` + +{{ header }} Options inherited from parent commands + +```shell + --as='' + Username to impersonate for the operation. User could be a regular user or a service + account in a namespace. + --as-group=[] + Group to impersonate for the operation, this flag can be repeated to specify multiple + groups. + --as-uid='' + UID to impersonate for the operation. + --cache-dir='~/.kube/cache' + Default cache directory + --certificate-authority='' + Path to a cert file for the certificate authority + --client-certificate='' + Path to a client certificate file for TLS + --client-key='' + Path to a client key file for TLS + --cluster='' + The name of the kubeconfig cluster to use + --context='' + The name of the kubeconfig context to use + --insecure-skip-tls-verify=false + If true, the server`s certificate will not be checked for validity. This will make your + HTTPS connections insecure + --kubeconfig='' + Path to the kubeconfig file to use for CLI requests. + --match-server-version=false + Require server version to match client version + -n, --namespace='' + If present, the namespace scope for this CLI request + --password='' + Password for basic authentication to the API server + --profile='none' + Name of profile to capture. One of (none|cpu|heap|goroutine|threadcreate|block|mutex) + --profile-output='profile.pprof' + Name of the file to write the profile to + --request-timeout='0' + The length of time to wait before giving up on a single server request. Non-zero values + should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don`t + timeout requests. + -s, --server='' + The address and port of the Kubernetes API server + --tls-server-name='' + Server name to use for server certificate validation. If it is not provided, the + hostname used to contact the server is used + --token='' + Bearer token for authentication to the API server + --user='' + The name of the kubeconfig user to use + --username='' + Username for basic authentication to the API server + --warnings-as-errors=false + Treat warnings received from the server as errors and exit with a non-zero exit code +``` + diff --git a/docs/_includes/reference/cli/werf_kubectl_run.short.md b/docs/_includes/reference/cli/werf_kubectl_run.short.md new file mode 100644 index 0000000000..01d1aa5a45 --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_run.short.md @@ -0,0 +1 @@ +run a particular image on the cluster \ No newline at end of file diff --git a/docs/_includes/reference/cli/werf_kubectl_scale.md b/docs/_includes/reference/cli/werf_kubectl_scale.md new file mode 100644 index 0000000000..08b381cd0b --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_scale.md @@ -0,0 +1,137 @@ +{% if include.header %} +{% assign header = include.header %} +{% else %} +{% assign header = "###" %} +{% endif %} +Set a new size for a deployment, replica set, replication controller, or stateful set. + + Scale also allows users to specify one or more preconditions for the scale action. + + If --current-replicas or --resource-version is specified, it is validated before the scale is attempted, and it is guaranteed that the precondition holds true when the scale is sent to the server. + +{{ header }} Syntax + +```shell +werf kubectl scale [--resource-version=version] [--current-replicas=count] --replicas=COUNT (-f FILENAME | TYPE NAME) [options] +``` + +{{ header }} Examples + +```shell + # Scale a replica set named 'foo' to 3 + kubectl scale --replicas=3 rs/foo + + # Scale a resource identified by type and name specified in "foo.yaml" to 3 + kubectl scale --replicas=3 -f foo.yaml + + # If the deployment named mysql's current size is 2, scale mysql to 3 + kubectl scale --current-replicas=2 --replicas=3 deployment/mysql + + # Scale multiple replication controllers + kubectl scale --replicas=5 rc/foo rc/bar rc/baz + + # Scale stateful set named 'web' to 3 + kubectl scale --replicas=3 statefulset/web +``` + +{{ header }} Options + +```shell + --all=false + Select all resources in the namespace of the specified resource types + --allow-missing-template-keys=true + If true, ignore any errors in templates when a field or map key is missing in the + template. Only applies to golang and jsonpath output formats. + --current-replicas=-1 + Precondition for current size. Requires that the current size of the resource match + this value in order to scale. -1 (default) for no condition. + --dry-run='none' + Must be "none", "server", or "client". If client strategy, only print the object that + would be sent, without sending it. If server strategy, submit server-side request + without persisting the resource. + -f, --filename=[] + Filename, directory, or URL to files identifying the resource to set a new size + -k, --kustomize='' + Process the kustomization directory. This flag can`t be used together with -f or -R. + -o, --output='' + Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile + |jsonpath|jsonpath-as-json|jsonpath-file. + -R, --recursive=false + Process the directory used in -f, --filename recursively. Useful when you want to + manage related manifests organized within the same directory. + --replicas=0 + The new desired number of replicas. Required. + --resource-version='' + Precondition for resource version. Requires that the current resource version match + this value in order to scale. + -l, --selector='' + Selector (label query) to filter on, supports `=`, `==`, and `!=`.(e.g. -l + key1=value1,key2=value2) + --show-managed-fields=false + If true, keep the managedFields when printing objects in JSON or YAML format. + --template='' + Template string or path to template file to use when -o=go-template, + -o=go-template-file. The template format is golang templates + [http://golang.org/pkg/text/template/#pkg-overview]. + --timeout=0s + The length of time to wait before giving up on a scale operation, zero means don`t + wait. Any other values should contain a corresponding time unit (e.g. 1s, 2m, 3h). +``` + +{{ header }} Options inherited from parent commands + +```shell + --as='' + Username to impersonate for the operation. User could be a regular user or a service + account in a namespace. + --as-group=[] + Group to impersonate for the operation, this flag can be repeated to specify multiple + groups. + --as-uid='' + UID to impersonate for the operation. + --cache-dir='~/.kube/cache' + Default cache directory + --certificate-authority='' + Path to a cert file for the certificate authority + --client-certificate='' + Path to a client certificate file for TLS + --client-key='' + Path to a client key file for TLS + --cluster='' + The name of the kubeconfig cluster to use + --context='' + The name of the kubeconfig context to use + --insecure-skip-tls-verify=false + If true, the server`s certificate will not be checked for validity. This will make your + HTTPS connections insecure + --kubeconfig='' + Path to the kubeconfig file to use for CLI requests. + --match-server-version=false + Require server version to match client version + -n, --namespace='' + If present, the namespace scope for this CLI request + --password='' + Password for basic authentication to the API server + --profile='none' + Name of profile to capture. One of (none|cpu|heap|goroutine|threadcreate|block|mutex) + --profile-output='profile.pprof' + Name of the file to write the profile to + --request-timeout='0' + The length of time to wait before giving up on a single server request. Non-zero values + should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don`t + timeout requests. + -s, --server='' + The address and port of the Kubernetes API server + --tls-server-name='' + Server name to use for server certificate validation. If it is not provided, the + hostname used to contact the server is used + --token='' + Bearer token for authentication to the API server + --user='' + The name of the kubeconfig user to use + --username='' + Username for basic authentication to the API server + --warnings-as-errors=false + Treat warnings received from the server as errors and exit with a non-zero exit code +``` + diff --git a/docs/_includes/reference/cli/werf_kubectl_scale.short.md b/docs/_includes/reference/cli/werf_kubectl_scale.short.md new file mode 100644 index 0000000000..a346215283 --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_scale.short.md @@ -0,0 +1 @@ +set a new size for a deployment, replica set, or replication controller \ No newline at end of file diff --git a/docs/_includes/reference/cli/werf_kubectl_set.md b/docs/_includes/reference/cli/werf_kubectl_set.md new file mode 100644 index 0000000000..fc758afba8 --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_set.md @@ -0,0 +1,72 @@ +{% if include.header %} +{% assign header = include.header %} +{% else %} +{% assign header = "###" %} +{% endif %} +Configure application resources. + + These commands help you make changes to existing application resources. + +{{ header }} Syntax + +```shell +werf kubectl set SUBCOMMAND +``` + +{{ header }} Options inherited from parent commands + +```shell + --as='' + Username to impersonate for the operation. User could be a regular user or a service + account in a namespace. + --as-group=[] + Group to impersonate for the operation, this flag can be repeated to specify multiple + groups. + --as-uid='' + UID to impersonate for the operation. + --cache-dir='~/.kube/cache' + Default cache directory + --certificate-authority='' + Path to a cert file for the certificate authority + --client-certificate='' + Path to a client certificate file for TLS + --client-key='' + Path to a client key file for TLS + --cluster='' + The name of the kubeconfig cluster to use + --context='' + The name of the kubeconfig context to use + --insecure-skip-tls-verify=false + If true, the server`s certificate will not be checked for validity. This will make your + HTTPS connections insecure + --kubeconfig='' + Path to the kubeconfig file to use for CLI requests. + --match-server-version=false + Require server version to match client version + -n, --namespace='' + If present, the namespace scope for this CLI request + --password='' + Password for basic authentication to the API server + --profile='none' + Name of profile to capture. One of (none|cpu|heap|goroutine|threadcreate|block|mutex) + --profile-output='profile.pprof' + Name of the file to write the profile to + --request-timeout='0' + The length of time to wait before giving up on a single server request. Non-zero values + should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don`t + timeout requests. + -s, --server='' + The address and port of the Kubernetes API server + --tls-server-name='' + Server name to use for server certificate validation. If it is not provided, the + hostname used to contact the server is used + --token='' + Bearer token for authentication to the API server + --user='' + The name of the kubeconfig user to use + --username='' + Username for basic authentication to the API server + --warnings-as-errors=false + Treat warnings received from the server as errors and exit with a non-zero exit code +``` + diff --git a/docs/_includes/reference/cli/werf_kubectl_set.short.md b/docs/_includes/reference/cli/werf_kubectl_set.short.md new file mode 100644 index 0000000000..8dec3dfc56 --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_set.short.md @@ -0,0 +1 @@ +set specific features on objects \ No newline at end of file diff --git a/docs/_includes/reference/cli/werf_kubectl_set_env.md b/docs/_includes/reference/cli/werf_kubectl_set_env.md new file mode 100644 index 0000000000..b23e802039 --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_set_env.md @@ -0,0 +1,170 @@ +{% if include.header %} +{% assign header = include.header %} +{% else %} +{% assign header = "###" %} +{% endif %} +Update environment variables on a pod template. + + List environment variable definitions in one or more pods, pod templates. Add, update, or remove container environment variable definitions in one or more pod templates (within replication controllers or deployment configurations). View or modify the environment variable definitions on all containers in the specified pods or pod templates, or just those that match a wildcard. + + If "--env -" is passed, environment variables can be read from STDIN using the standard env syntax. + + Possible resources include (case insensitive): + + pod (po), replicationcontroller (rc), deployment (deploy), daemonset (ds), statefulset (sts), cronjob (cj), replicaset (rs) + +{{ header }} Syntax + +```shell +werf kubectl set env RESOURCE/NAME KEY_1=VAL_1 ... KEY_N=VAL_N [options] +``` + +{{ header }} Examples + +```shell + # Update deployment 'registry' with a new environment variable + kubectl set env deployment/registry STORAGE_DIR=/local + + # List the environment variables defined on a deployments 'sample-build' + kubectl set env deployment/sample-build --list + + # List the environment variables defined on all pods + kubectl set env pods --all --list + + # Output modified deployment in YAML, and does not alter the object on the server + kubectl set env deployment/sample-build STORAGE_DIR=/data -o yaml + + # Update all containers in all replication controllers in the project to have ENV=prod + kubectl set env rc --all ENV=prod + + # Import environment from a secret + kubectl set env --from=secret/mysecret deployment/myapp + + # Import environment from a config map with a prefix + kubectl set env --from=configmap/myconfigmap --prefix=MYSQL_ deployment/myapp + + # Import specific keys from a config map + kubectl set env --keys=my-example-key --from=configmap/myconfigmap deployment/myapp + + # Remove the environment variable ENV from container 'c1' in all deployment configs + kubectl set env deployments --all --containers="c1" ENV- + + # Remove the environment variable ENV from a deployment definition on disk and + # update the deployment config on the server + kubectl set env -f deploy.json ENV- + + # Set some of the local shell environment into a deployment config on the server + env | grep RAILS_ | kubectl set env -e - deployment/registry +``` + +{{ header }} Options + +```shell + --all=false + If true, select all resources in the namespace of the specified resource types + --allow-missing-template-keys=true + If true, ignore any errors in templates when a field or map key is missing in the + template. Only applies to golang and jsonpath output formats. + -c, --containers='*' + The names of containers in the selected pod templates to change - may use wildcards + --dry-run='none' + Must be "none", "server", or "client". If client strategy, only print the object that + would be sent, without sending it. If server strategy, submit server-side request + without persisting the resource. + -e, --env=[] + Specify a key-value pair for an environment variable to set into each container. + --field-manager='kubectl-set' + Name of the manager used to track field ownership. + -f, --filename=[] + Filename, directory, or URL to files the resource to update the env + --from='' + The name of a resource from which to inject environment variables + --keys=[] + Comma-separated list of keys to import from specified resource + -k, --kustomize='' + Process the kustomization directory. This flag can`t be used together with -f or -R. + --list=false + If true, display the environment and any changes in the standard format. this flag will + removed when we have kubectl view env. + --local=false + If true, set env will NOT contact api-server but run locally. + -o, --output='' + Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile + |jsonpath|jsonpath-as-json|jsonpath-file. + --overwrite=true + If true, allow environment to be overwritten, otherwise reject updates that overwrite + existing environment. + --prefix='' + Prefix to append to variable names + -R, --recursive=false + Process the directory used in -f, --filename recursively. Useful when you want to + manage related manifests organized within the same directory. + --resolve=false + If true, show secret or configmap references when listing variables + -l, --selector='' + Selector (label query) to filter on + --show-managed-fields=false + If true, keep the managedFields when printing objects in JSON or YAML format. + --template='' + Template string or path to template file to use when -o=go-template, + -o=go-template-file. The template format is golang templates + [http://golang.org/pkg/text/template/#pkg-overview]. +``` + +{{ header }} Options inherited from parent commands + +```shell + --as='' + Username to impersonate for the operation. User could be a regular user or a service + account in a namespace. + --as-group=[] + Group to impersonate for the operation, this flag can be repeated to specify multiple + groups. + --as-uid='' + UID to impersonate for the operation. + --cache-dir='~/.kube/cache' + Default cache directory + --certificate-authority='' + Path to a cert file for the certificate authority + --client-certificate='' + Path to a client certificate file for TLS + --client-key='' + Path to a client key file for TLS + --cluster='' + The name of the kubeconfig cluster to use + --context='' + The name of the kubeconfig context to use + --insecure-skip-tls-verify=false + If true, the server`s certificate will not be checked for validity. This will make your + HTTPS connections insecure + --kubeconfig='' + Path to the kubeconfig file to use for CLI requests. + --match-server-version=false + Require server version to match client version + -n, --namespace='' + If present, the namespace scope for this CLI request + --password='' + Password for basic authentication to the API server + --profile='none' + Name of profile to capture. One of (none|cpu|heap|goroutine|threadcreate|block|mutex) + --profile-output='profile.pprof' + Name of the file to write the profile to + --request-timeout='0' + The length of time to wait before giving up on a single server request. Non-zero values + should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don`t + timeout requests. + -s, --server='' + The address and port of the Kubernetes API server + --tls-server-name='' + Server name to use for server certificate validation. If it is not provided, the + hostname used to contact the server is used + --token='' + Bearer token for authentication to the API server + --user='' + The name of the kubeconfig user to use + --username='' + Username for basic authentication to the API server + --warnings-as-errors=false + Treat warnings received from the server as errors and exit with a non-zero exit code +``` + diff --git a/docs/_includes/reference/cli/werf_kubectl_set_env.short.md b/docs/_includes/reference/cli/werf_kubectl_set_env.short.md new file mode 100644 index 0000000000..6bbe493a50 --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_set_env.short.md @@ -0,0 +1 @@ +update environment variables on a pod template \ No newline at end of file diff --git a/docs/_includes/reference/cli/werf_kubectl_set_image.md b/docs/_includes/reference/cli/werf_kubectl_set_image.md new file mode 100644 index 0000000000..e1ee8aef65 --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_set_image.md @@ -0,0 +1,127 @@ +{% if include.header %} +{% assign header = include.header %} +{% else %} +{% assign header = "###" %} +{% endif %} +Update existing container image(s) of resources. + + Possible resources include (case insensitive): + + pod (po), replicationcontroller (rc), deployment (deploy), daemonset (ds), statefulset (sts), cronjob (cj), replicaset (rs) + +{{ header }} Syntax + +```shell +werf kubectl set image (-f FILENAME | TYPE NAME) CONTAINER_NAME_1=CONTAINER_IMAGE_1 ... CONTAINER_NAME_N=CONTAINER_IMAGE_N [options] +``` + +{{ header }} Examples + +```shell + # Set a deployment's nginx container image to 'nginx:1.9.1', and its busybox container image to 'busybox' + kubectl set image deployment/nginx busybox=busybox nginx=nginx:1.9.1 + + # Update all deployments' and rc's nginx container's image to 'nginx:1.9.1' + kubectl set image deployments,rc nginx=nginx:1.9.1 --all + + # Update image of all containers of daemonset abc to 'nginx:1.9.1' + kubectl set image daemonset abc *=nginx:1.9.1 + + # Print result (in yaml format) of updating nginx container image from local file, without hitting the server + kubectl set image -f path/to/file.yaml nginx=nginx:1.9.1 --local -o yaml +``` + +{{ header }} Options + +```shell + --all=false + Select all resources, in the namespace of the specified resource types + --allow-missing-template-keys=true + If true, ignore any errors in templates when a field or map key is missing in the + template. Only applies to golang and jsonpath output formats. + --dry-run='none' + Must be "none", "server", or "client". If client strategy, only print the object that + would be sent, without sending it. If server strategy, submit server-side request + without persisting the resource. + --field-manager='kubectl-set' + Name of the manager used to track field ownership. + -f, --filename=[] + Filename, directory, or URL to files identifying the resource to get from a server. + -k, --kustomize='' + Process the kustomization directory. This flag can`t be used together with -f or -R. + --local=false + If true, set image will NOT contact api-server but run locally. + -o, --output='' + Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile + |jsonpath|jsonpath-as-json|jsonpath-file. + -R, --recursive=false + Process the directory used in -f, --filename recursively. Useful when you want to + manage related manifests organized within the same directory. + -l, --selector='' + Selector (label query) to filter on, supports `=`, `==`, and `!=`.(e.g. -l + key1=value1,key2=value2) + --show-managed-fields=false + If true, keep the managedFields when printing objects in JSON or YAML format. + --template='' + Template string or path to template file to use when -o=go-template, + -o=go-template-file. The template format is golang templates + [http://golang.org/pkg/text/template/#pkg-overview]. +``` + +{{ header }} Options inherited from parent commands + +```shell + --as='' + Username to impersonate for the operation. User could be a regular user or a service + account in a namespace. + --as-group=[] + Group to impersonate for the operation, this flag can be repeated to specify multiple + groups. + --as-uid='' + UID to impersonate for the operation. + --cache-dir='~/.kube/cache' + Default cache directory + --certificate-authority='' + Path to a cert file for the certificate authority + --client-certificate='' + Path to a client certificate file for TLS + --client-key='' + Path to a client key file for TLS + --cluster='' + The name of the kubeconfig cluster to use + --context='' + The name of the kubeconfig context to use + --insecure-skip-tls-verify=false + If true, the server`s certificate will not be checked for validity. This will make your + HTTPS connections insecure + --kubeconfig='' + Path to the kubeconfig file to use for CLI requests. + --match-server-version=false + Require server version to match client version + -n, --namespace='' + If present, the namespace scope for this CLI request + --password='' + Password for basic authentication to the API server + --profile='none' + Name of profile to capture. One of (none|cpu|heap|goroutine|threadcreate|block|mutex) + --profile-output='profile.pprof' + Name of the file to write the profile to + --request-timeout='0' + The length of time to wait before giving up on a single server request. Non-zero values + should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don`t + timeout requests. + -s, --server='' + The address and port of the Kubernetes API server + --tls-server-name='' + Server name to use for server certificate validation. If it is not provided, the + hostname used to contact the server is used + --token='' + Bearer token for authentication to the API server + --user='' + The name of the kubeconfig user to use + --username='' + Username for basic authentication to the API server + --warnings-as-errors=false + Treat warnings received from the server as errors and exit with a non-zero exit code +``` + diff --git a/docs/_includes/reference/cli/werf_kubectl_set_image.short.md b/docs/_includes/reference/cli/werf_kubectl_set_image.short.md new file mode 100644 index 0000000000..4def95b246 --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_set_image.short.md @@ -0,0 +1 @@ +update the image of a pod template \ No newline at end of file diff --git a/docs/_includes/reference/cli/werf_kubectl_set_resources.md b/docs/_includes/reference/cli/werf_kubectl_set_resources.md new file mode 100644 index 0000000000..edcf782dbe --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_set_resources.md @@ -0,0 +1,138 @@ +{% if include.header %} +{% assign header = include.header %} +{% else %} +{% assign header = "###" %} +{% endif %} +Specify compute resource requirements (CPU, memory) for any resource that defines a pod template. If a pod is successfully scheduled, it is guaranteed the amount of resource requested, but may burst up to its specified limits. + + For each compute resource, if a limit is specified and a request is omitted, the request will default to the limit. + + Possible resources include (case insensitive): Use "kubectl api-resources" for a complete list of supported resources.. + +{{ header }} Syntax + +```shell +werf kubectl set resources (-f FILENAME | TYPE NAME) ([--limits=LIMITS & --requests=REQUESTS] [options] +``` + +{{ header }} Examples + +```shell + # Set a deployments nginx container cpu limits to "200m" and memory to "512Mi" + kubectl set resources deployment nginx -c=nginx --limits=cpu=200m,memory=512Mi + + # Set the resource request and limits for all containers in nginx + kubectl set resources deployment nginx --limits=cpu=200m,memory=512Mi --requests=cpu=100m,memory=256Mi + + # Remove the resource requests for resources on containers in nginx + kubectl set resources deployment nginx --limits=cpu=0,memory=0 --requests=cpu=0,memory=0 + + # Print the result (in yaml format) of updating nginx container limits from a local, without hitting the server + kubectl set resources -f path/to/file.yaml --limits=cpu=200m,memory=512Mi --local -o yaml +``` + +{{ header }} Options + +```shell + --all=false + Select all resources, in the namespace of the specified resource types + --allow-missing-template-keys=true + If true, ignore any errors in templates when a field or map key is missing in the + template. Only applies to golang and jsonpath output formats. + -c, --containers='*' + The names of containers in the selected pod templates to change, all containers are + selected by default - may use wildcards + --dry-run='none' + Must be "none", "server", or "client". If client strategy, only print the object that + would be sent, without sending it. If server strategy, submit server-side request + without persisting the resource. + --field-manager='kubectl-set' + Name of the manager used to track field ownership. + -f, --filename=[] + Filename, directory, or URL to files identifying the resource to get from a server. + -k, --kustomize='' + Process the kustomization directory. This flag can`t be used together with -f or -R. + --limits='' + The resource requirement requests for this container. For example, + `cpu=100m,memory=256Mi`. Note that server side components may assign requests + depending on the server configuration, such as limit ranges. + --local=false + If true, set resources will NOT contact api-server but run locally. + -o, --output='' + Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile + |jsonpath|jsonpath-as-json|jsonpath-file. + -R, --recursive=false + Process the directory used in -f, --filename recursively. Useful when you want to + manage related manifests organized within the same directory. + --requests='' + The resource requirement requests for this container. For example, + `cpu=100m,memory=256Mi`. Note that server side components may assign requests + depending on the server configuration, such as limit ranges. + -l, --selector='' + Selector (label query) to filter on, supports `=`, `==`, and `!=`.(e.g. -l + key1=value1,key2=value2) + --show-managed-fields=false + If true, keep the managedFields when printing objects in JSON or YAML format. + --template='' + Template string or path to template file to use when -o=go-template, + -o=go-template-file. The template format is golang templates + [http://golang.org/pkg/text/template/#pkg-overview]. +``` + +{{ header }} Options inherited from parent commands + +```shell + --as='' + Username to impersonate for the operation. User could be a regular user or a service + account in a namespace. + --as-group=[] + Group to impersonate for the operation, this flag can be repeated to specify multiple + groups. + --as-uid='' + UID to impersonate for the operation. + --cache-dir='~/.kube/cache' + Default cache directory + --certificate-authority='' + Path to a cert file for the certificate authority + --client-certificate='' + Path to a client certificate file for TLS + --client-key='' + Path to a client key file for TLS + --cluster='' + The name of the kubeconfig cluster to use + --context='' + The name of the kubeconfig context to use + --insecure-skip-tls-verify=false + If true, the server`s certificate will not be checked for validity. This will make your + HTTPS connections insecure + --kubeconfig='' + Path to the kubeconfig file to use for CLI requests. + --match-server-version=false + Require server version to match client version + -n, --namespace='' + If present, the namespace scope for this CLI request + --password='' + Password for basic authentication to the API server + --profile='none' + Name of profile to capture. One of (none|cpu|heap|goroutine|threadcreate|block|mutex) + --profile-output='profile.pprof' + Name of the file to write the profile to + --request-timeout='0' + The length of time to wait before giving up on a single server request. Non-zero values + should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don`t + timeout requests. + -s, --server='' + The address and port of the Kubernetes API server + --tls-server-name='' + Server name to use for server certificate validation. If it is not provided, the + hostname used to contact the server is used + --token='' + Bearer token for authentication to the API server + --user='' + The name of the kubeconfig user to use + --username='' + Username for basic authentication to the API server + --warnings-as-errors=false + Treat warnings received from the server as errors and exit with a non-zero exit code +``` + diff --git a/docs/_includes/reference/cli/werf_kubectl_set_resources.short.md b/docs/_includes/reference/cli/werf_kubectl_set_resources.short.md new file mode 100644 index 0000000000..75eea41aab --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_set_resources.short.md @@ -0,0 +1 @@ +update resource requests/limits on objects with pod templates \ No newline at end of file diff --git a/docs/_includes/reference/cli/werf_kubectl_set_selector.md b/docs/_includes/reference/cli/werf_kubectl_set_selector.md new file mode 100644 index 0000000000..490037ef8d --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_set_selector.md @@ -0,0 +1,115 @@ +{% if include.header %} +{% assign header = include.header %} +{% else %} +{% assign header = "###" %} +{% endif %} +Set the selector on a resource. Note that the new selector will overwrite the old selector if the resource had one prior to the invocation of 'set selector'. + + A selector must begin with a letter or number, and may contain letters, numbers, hyphens, dots, and underscores, up to 63 characters. If --resource-version is specified, then updates will use this resource version, otherwise the existing resource-version will be used. Note: currently selectors can only be set on Service objects. + +{{ header }} Syntax + +```shell +werf kubectl set selector (-f FILENAME | TYPE NAME) EXPRESSIONS [--resource-version=version] [options] +``` + +{{ header }} Examples + +```shell + # Set the labels and selector before creating a deployment/service pair + kubectl create service clusterip my-svc --clusterip="None" -o yaml --dry-run=client | kubectl set selector --local -f - 'environment=qa' -o yaml | kubectl create -f - + kubectl create deployment my-dep -o yaml --dry-run=client | kubectl label --local -f - environment=qa -o yaml | kubectl create -f - +``` + +{{ header }} Options + +```shell + --all=false + Select all resources in the namespace of the specified resource types + --allow-missing-template-keys=true + If true, ignore any errors in templates when a field or map key is missing in the + template. Only applies to golang and jsonpath output formats. + --dry-run='none' + Must be "none", "server", or "client". If client strategy, only print the object that + would be sent, without sending it. If server strategy, submit server-side request + without persisting the resource. + --field-manager='kubectl-set' + Name of the manager used to track field ownership. + -f, --filename=[] + identifying the resource. + --local=false + If true, annotation will NOT contact api-server but run locally. + -o, --output='' + Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile + |jsonpath|jsonpath-as-json|jsonpath-file. + -R, --recursive=true + Process the directory used in -f, --filename recursively. Useful when you want to + manage related manifests organized within the same directory. + --resource-version='' + If non-empty, the selectors update will only succeed if this is the current + resource-version for the object. Only valid when specifying a single resource. + --show-managed-fields=false + If true, keep the managedFields when printing objects in JSON or YAML format. + --template='' + Template string or path to template file to use when -o=go-template, + -o=go-template-file. The template format is golang templates + [http://golang.org/pkg/text/template/#pkg-overview]. +``` + +{{ header }} Options inherited from parent commands + +```shell + --as='' + Username to impersonate for the operation. User could be a regular user or a service + account in a namespace. + --as-group=[] + Group to impersonate for the operation, this flag can be repeated to specify multiple + groups. + --as-uid='' + UID to impersonate for the operation. + --cache-dir='~/.kube/cache' + Default cache directory + --certificate-authority='' + Path to a cert file for the certificate authority + --client-certificate='' + Path to a client certificate file for TLS + --client-key='' + Path to a client key file for TLS + --cluster='' + The name of the kubeconfig cluster to use + --context='' + The name of the kubeconfig context to use + --insecure-skip-tls-verify=false + If true, the server`s certificate will not be checked for validity. This will make your + HTTPS connections insecure + --kubeconfig='' + Path to the kubeconfig file to use for CLI requests. + --match-server-version=false + Require server version to match client version + -n, --namespace='' + If present, the namespace scope for this CLI request + --password='' + Password for basic authentication to the API server + --profile='none' + Name of profile to capture. One of (none|cpu|heap|goroutine|threadcreate|block|mutex) + --profile-output='profile.pprof' + Name of the file to write the profile to + --request-timeout='0' + The length of time to wait before giving up on a single server request. Non-zero values + should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don`t + timeout requests. + -s, --server='' + The address and port of the Kubernetes API server + --tls-server-name='' + Server name to use for server certificate validation. If it is not provided, the + hostname used to contact the server is used + --token='' + Bearer token for authentication to the API server + --user='' + The name of the kubeconfig user to use + --username='' + Username for basic authentication to the API server + --warnings-as-errors=false + Treat warnings received from the server as errors and exit with a non-zero exit code +``` + diff --git a/docs/_includes/reference/cli/werf_kubectl_set_selector.short.md b/docs/_includes/reference/cli/werf_kubectl_set_selector.short.md new file mode 100644 index 0000000000..d8a8d87a87 --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_set_selector.short.md @@ -0,0 +1 @@ +set the selector on a resource \ No newline at end of file diff --git a/docs/_includes/reference/cli/werf_kubectl_set_serviceaccount.md b/docs/_includes/reference/cli/werf_kubectl_set_serviceaccount.md new file mode 100644 index 0000000000..0c7bdb8cbe --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_set_serviceaccount.md @@ -0,0 +1,118 @@ +{% if include.header %} +{% assign header = include.header %} +{% else %} +{% assign header = "###" %} +{% endif %} +Update the service account of pod template resources. + + Possible resources (case insensitive) can be: + + replicationcontroller (rc), deployment (deploy), daemonset (ds), job, replicaset (rs), statefulset + +{{ header }} Syntax + +```shell +werf kubectl set serviceaccount (-f FILENAME | TYPE NAME) SERVICE_ACCOUNT [options] +``` + +{{ header }} Examples + +```shell + # Set deployment nginx-deployment's service account to serviceaccount1 + kubectl set serviceaccount deployment nginx-deployment serviceaccount1 + + # Print the result (in YAML format) of updated nginx deployment with the service account from local file, without hitting the API server + kubectl set sa -f nginx-deployment.yaml serviceaccount1 --local --dry-run=client -o yaml +``` + +{{ header }} Options + +```shell + --all=false + Select all resources, in the namespace of the specified resource types + --allow-missing-template-keys=true + If true, ignore any errors in templates when a field or map key is missing in the + template. Only applies to golang and jsonpath output formats. + --dry-run='none' + Must be "none", "server", or "client". If client strategy, only print the object that + would be sent, without sending it. If server strategy, submit server-side request + without persisting the resource. + --field-manager='kubectl-set' + Name of the manager used to track field ownership. + -f, --filename=[] + Filename, directory, or URL to files identifying the resource to get from a server. + -k, --kustomize='' + Process the kustomization directory. This flag can`t be used together with -f or -R. + --local=false + If true, set serviceaccount will NOT contact api-server but run locally. + -o, --output='' + Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile + |jsonpath|jsonpath-as-json|jsonpath-file. + -R, --recursive=false + Process the directory used in -f, --filename recursively. Useful when you want to + manage related manifests organized within the same directory. + --show-managed-fields=false + If true, keep the managedFields when printing objects in JSON or YAML format. + --template='' + Template string or path to template file to use when -o=go-template, + -o=go-template-file. The template format is golang templates + [http://golang.org/pkg/text/template/#pkg-overview]. +``` + +{{ header }} Options inherited from parent commands + +```shell + --as='' + Username to impersonate for the operation. User could be a regular user or a service + account in a namespace. + --as-group=[] + Group to impersonate for the operation, this flag can be repeated to specify multiple + groups. + --as-uid='' + UID to impersonate for the operation. + --cache-dir='~/.kube/cache' + Default cache directory + --certificate-authority='' + Path to a cert file for the certificate authority + --client-certificate='' + Path to a client certificate file for TLS + --client-key='' + Path to a client key file for TLS + --cluster='' + The name of the kubeconfig cluster to use + --context='' + The name of the kubeconfig context to use + --insecure-skip-tls-verify=false + If true, the server`s certificate will not be checked for validity. This will make your + HTTPS connections insecure + --kubeconfig='' + Path to the kubeconfig file to use for CLI requests. + --match-server-version=false + Require server version to match client version + -n, --namespace='' + If present, the namespace scope for this CLI request + --password='' + Password for basic authentication to the API server + --profile='none' + Name of profile to capture. One of (none|cpu|heap|goroutine|threadcreate|block|mutex) + --profile-output='profile.pprof' + Name of the file to write the profile to + --request-timeout='0' + The length of time to wait before giving up on a single server request. Non-zero values + should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don`t + timeout requests. + -s, --server='' + The address and port of the Kubernetes API server + --tls-server-name='' + Server name to use for server certificate validation. If it is not provided, the + hostname used to contact the server is used + --token='' + Bearer token for authentication to the API server + --user='' + The name of the kubeconfig user to use + --username='' + Username for basic authentication to the API server + --warnings-as-errors=false + Treat warnings received from the server as errors and exit with a non-zero exit code +``` + diff --git a/docs/_includes/reference/cli/werf_kubectl_set_serviceaccount.short.md b/docs/_includes/reference/cli/werf_kubectl_set_serviceaccount.short.md new file mode 100644 index 0000000000..93fec0b9eb --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_set_serviceaccount.short.md @@ -0,0 +1 @@ +update the service account of a resource \ No newline at end of file diff --git a/docs/_includes/reference/cli/werf_kubectl_set_subject.md b/docs/_includes/reference/cli/werf_kubectl_set_subject.md new file mode 100644 index 0000000000..a960719170 --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_set_subject.md @@ -0,0 +1,124 @@ +{% if include.header %} +{% assign header = include.header %} +{% else %} +{% assign header = "###" %} +{% endif %} +Update the user, group, or service account in a role binding or cluster role binding. + +{{ header }} Syntax + +```shell +werf kubectl set subject (-f FILENAME | TYPE NAME) [--user=username] [--group=groupname] [--serviceaccount=namespace:serviceaccountname] [--dry-run=server|client|none] [options] +``` + +{{ header }} Examples + +```shell + # Update a cluster role binding for serviceaccount1 + kubectl set subject clusterrolebinding admin --serviceaccount=namespace:serviceaccount1 + + # Update a role binding for user1, user2, and group1 + kubectl set subject rolebinding admin --user=user1 --user=user2 --group=group1 + + # Print the result (in YAML format) of updating rolebinding subjects from a local, without hitting the server + kubectl create rolebinding admin --role=admin --user=admin -o yaml --dry-run=client | kubectl set subject --local -f - --user=foo -o yaml +``` + +{{ header }} Options + +```shell + --all=false + Select all resources, in the namespace of the specified resource types + --allow-missing-template-keys=true + If true, ignore any errors in templates when a field or map key is missing in the + template. Only applies to golang and jsonpath output formats. + --dry-run='none' + Must be "none", "server", or "client". If client strategy, only print the object that + would be sent, without sending it. If server strategy, submit server-side request + without persisting the resource. + --field-manager='kubectl-set' + Name of the manager used to track field ownership. + -f, --filename=[] + Filename, directory, or URL to files the resource to update the subjects + --group=[] + Groups to bind to the role + -k, --kustomize='' + Process the kustomization directory. This flag can`t be used together with -f or -R. + --local=false + If true, set subject will NOT contact api-server but run locally. + -o, --output='' + Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile + |jsonpath|jsonpath-as-json|jsonpath-file. + -R, --recursive=false + Process the directory used in -f, --filename recursively. Useful when you want to + manage related manifests organized within the same directory. + -l, --selector='' + Selector (label query) to filter on, supports `=`, `==`, and `!=`.(e.g. -l + key1=value1,key2=value2) + --serviceaccount=[] + Service accounts to bind to the role + --show-managed-fields=false + If true, keep the managedFields when printing objects in JSON or YAML format. + --template='' + Template string or path to template file to use when -o=go-template, + -o=go-template-file. The template format is golang templates + [http://golang.org/pkg/text/template/#pkg-overview]. +``` + +{{ header }} Options inherited from parent commands + +```shell + --as='' + Username to impersonate for the operation. User could be a regular user or a service + account in a namespace. + --as-group=[] + Group to impersonate for the operation, this flag can be repeated to specify multiple + groups. + --as-uid='' + UID to impersonate for the operation. + --cache-dir='~/.kube/cache' + Default cache directory + --certificate-authority='' + Path to a cert file for the certificate authority + --client-certificate='' + Path to a client certificate file for TLS + --client-key='' + Path to a client key file for TLS + --cluster='' + The name of the kubeconfig cluster to use + --context='' + The name of the kubeconfig context to use + --insecure-skip-tls-verify=false + If true, the server`s certificate will not be checked for validity. This will make your + HTTPS connections insecure + --kubeconfig='' + Path to the kubeconfig file to use for CLI requests. + --match-server-version=false + Require server version to match client version + -n, --namespace='' + If present, the namespace scope for this CLI request + --password='' + Password for basic authentication to the API server + --profile='none' + Name of profile to capture. One of (none|cpu|heap|goroutine|threadcreate|block|mutex) + --profile-output='profile.pprof' + Name of the file to write the profile to + --request-timeout='0' + The length of time to wait before giving up on a single server request. Non-zero values + should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don`t + timeout requests. + -s, --server='' + The address and port of the Kubernetes API server + --tls-server-name='' + Server name to use for server certificate validation. If it is not provided, the + hostname used to contact the server is used + --token='' + Bearer token for authentication to the API server + --user='' + The name of the kubeconfig user to use + --username='' + Username for basic authentication to the API server + --warnings-as-errors=false + Treat warnings received from the server as errors and exit with a non-zero exit code +``` + diff --git a/docs/_includes/reference/cli/werf_kubectl_set_subject.short.md b/docs/_includes/reference/cli/werf_kubectl_set_subject.short.md new file mode 100644 index 0000000000..d996a20b5f --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_set_subject.short.md @@ -0,0 +1 @@ +update the user, group, or service account in a role binding or cluster role binding \ No newline at end of file diff --git a/docs/_includes/reference/cli/werf_kubectl_taint.md b/docs/_includes/reference/cli/werf_kubectl_taint.md new file mode 100644 index 0000000000..10c74f4de9 --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_taint.md @@ -0,0 +1,130 @@ +{% if include.header %} +{% assign header = include.header %} +{% else %} +{% assign header = "###" %} +{% endif %} +Update the taints on one or more nodes. + + * A taint consists of a key, value, and effect. As an argument here, it is expressed as key=value:effect. + * The key must begin with a letter or number, and may contain letters, numbers, hyphens, dots, and underscores, up to 253 characters. + * Optionally, the key can begin with a DNS subdomain prefix and a single '/', like example.com/my-app. + * The value is optional. If given, it must begin with a letter or number, and may contain letters, numbers, hyphens, dots, and underscores, up to 63 characters. + * The effect must be NoSchedule, PreferNoSchedule or NoExecute. + * Currently taint can only apply to node. + +{{ header }} Syntax + +```shell +werf kubectl taint NODE NAME KEY_1=VAL_1:TAINT_EFFECT_1 ... KEY_N=VAL_N:TAINT_EFFECT_N [options] +``` + +{{ header }} Examples + +```shell + # Update node 'foo' with a taint with key 'dedicated' and value 'special-user' and effect 'NoSchedule' + # If a taint with that key and effect already exists, its value is replaced as specified + kubectl taint nodes foo dedicated=special-user:NoSchedule + + # Remove from node 'foo' the taint with key 'dedicated' and effect 'NoSchedule' if one exists + kubectl taint nodes foo dedicated:NoSchedule- + + # Remove from node 'foo' all the taints with key 'dedicated' + kubectl taint nodes foo dedicated- + + # Add a taint with key 'dedicated' on nodes having label mylabel=X + kubectl taint node -l myLabel=X dedicated=foo:PreferNoSchedule + + # Add to node 'foo' a taint with key 'bar' and no value + kubectl taint nodes foo bar:NoSchedule +``` + +{{ header }} Options + +```shell + --all=false + Select all nodes in the cluster + --allow-missing-template-keys=true + If true, ignore any errors in templates when a field or map key is missing in the + template. Only applies to golang and jsonpath output formats. + --dry-run='none' + Must be "none", "server", or "client". If client strategy, only print the object that + would be sent, without sending it. If server strategy, submit server-side request + without persisting the resource. + --field-manager='kubectl-taint' + Name of the manager used to track field ownership. + -o, --output='' + Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile + |jsonpath|jsonpath-as-json|jsonpath-file. + --overwrite=false + If true, allow taints to be overwritten, otherwise reject taint updates that overwrite + existing taints. + -l, --selector='' + Selector (label query) to filter on, supports `=`, `==`, and `!=`.(e.g. -l + key1=value1,key2=value2) + --show-managed-fields=false + If true, keep the managedFields when printing objects in JSON or YAML format. + --template='' + Template string or path to template file to use when -o=go-template, + -o=go-template-file. The template format is golang templates + [http://golang.org/pkg/text/template/#pkg-overview]. + --validate=true + If true, use a schema to validate the input before sending it +``` + +{{ header }} Options inherited from parent commands + +```shell + --as='' + Username to impersonate for the operation. User could be a regular user or a service + account in a namespace. + --as-group=[] + Group to impersonate for the operation, this flag can be repeated to specify multiple + groups. + --as-uid='' + UID to impersonate for the operation. + --cache-dir='~/.kube/cache' + Default cache directory + --certificate-authority='' + Path to a cert file for the certificate authority + --client-certificate='' + Path to a client certificate file for TLS + --client-key='' + Path to a client key file for TLS + --cluster='' + The name of the kubeconfig cluster to use + --context='' + The name of the kubeconfig context to use + --insecure-skip-tls-verify=false + If true, the server`s certificate will not be checked for validity. This will make your + HTTPS connections insecure + --kubeconfig='' + Path to the kubeconfig file to use for CLI requests. + --match-server-version=false + Require server version to match client version + -n, --namespace='' + If present, the namespace scope for this CLI request + --password='' + Password for basic authentication to the API server + --profile='none' + Name of profile to capture. One of (none|cpu|heap|goroutine|threadcreate|block|mutex) + --profile-output='profile.pprof' + Name of the file to write the profile to + --request-timeout='0' + The length of time to wait before giving up on a single server request. Non-zero values + should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don`t + timeout requests. + -s, --server='' + The address and port of the Kubernetes API server + --tls-server-name='' + Server name to use for server certificate validation. If it is not provided, the + hostname used to contact the server is used + --token='' + Bearer token for authentication to the API server + --user='' + The name of the kubeconfig user to use + --username='' + Username for basic authentication to the API server + --warnings-as-errors=false + Treat warnings received from the server as errors and exit with a non-zero exit code +``` + diff --git a/docs/_includes/reference/cli/werf_kubectl_taint.short.md b/docs/_includes/reference/cli/werf_kubectl_taint.short.md new file mode 100644 index 0000000000..1920337ca5 --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_taint.short.md @@ -0,0 +1 @@ +update the taints on one or more nodes \ No newline at end of file diff --git a/docs/_includes/reference/cli/werf_kubectl_top.md b/docs/_includes/reference/cli/werf_kubectl_top.md new file mode 100644 index 0000000000..eafbf139fd --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_top.md @@ -0,0 +1,74 @@ +{% if include.header %} +{% assign header = include.header %} +{% else %} +{% assign header = "###" %} +{% endif %} +Display Resource (CPU/Memory) usage. + + The top command allows you to see the resource consumption for nodes or pods. + + This command requires Metrics Server to be correctly configured and working on the server. + +{{ header }} Syntax + +```shell +werf kubectl top +``` + +{{ header }} Options inherited from parent commands + +```shell + --as='' + Username to impersonate for the operation. User could be a regular user or a service + account in a namespace. + --as-group=[] + Group to impersonate for the operation, this flag can be repeated to specify multiple + groups. + --as-uid='' + UID to impersonate for the operation. + --cache-dir='~/.kube/cache' + Default cache directory + --certificate-authority='' + Path to a cert file for the certificate authority + --client-certificate='' + Path to a client certificate file for TLS + --client-key='' + Path to a client key file for TLS + --cluster='' + The name of the kubeconfig cluster to use + --context='' + The name of the kubeconfig context to use + --insecure-skip-tls-verify=false + If true, the server`s certificate will not be checked for validity. This will make your + HTTPS connections insecure + --kubeconfig='' + Path to the kubeconfig file to use for CLI requests. + --match-server-version=false + Require server version to match client version + -n, --namespace='' + If present, the namespace scope for this CLI request + --password='' + Password for basic authentication to the API server + --profile='none' + Name of profile to capture. One of (none|cpu|heap|goroutine|threadcreate|block|mutex) + --profile-output='profile.pprof' + Name of the file to write the profile to + --request-timeout='0' + The length of time to wait before giving up on a single server request. Non-zero values + should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don`t + timeout requests. + -s, --server='' + The address and port of the Kubernetes API server + --tls-server-name='' + Server name to use for server certificate validation. If it is not provided, the + hostname used to contact the server is used + --token='' + Bearer token for authentication to the API server + --user='' + The name of the kubeconfig user to use + --username='' + Username for basic authentication to the API server + --warnings-as-errors=false + Treat warnings received from the server as errors and exit with a non-zero exit code +``` + diff --git a/docs/_includes/reference/cli/werf_kubectl_top.short.md b/docs/_includes/reference/cli/werf_kubectl_top.short.md new file mode 100644 index 0000000000..41e9a7feb2 --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_top.short.md @@ -0,0 +1 @@ +display resource (CPU/memory) usage \ No newline at end of file diff --git a/docs/_includes/reference/cli/werf_kubectl_top_node.md b/docs/_includes/reference/cli/werf_kubectl_top_node.md new file mode 100644 index 0000000000..2d89c1f6d9 --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_top_node.md @@ -0,0 +1,99 @@ +{% if include.header %} +{% assign header = include.header %} +{% else %} +{% assign header = "###" %} +{% endif %} +Display resource (CPU/memory) usage of nodes. + + The top-node command allows you to see the resource consumption of nodes. + +{{ header }} Syntax + +```shell +werf kubectl top node [NAME | -l label] [options] +``` + +{{ header }} Examples + +```shell + # Show metrics for all nodes + kubectl top node + + # Show metrics for a given node + kubectl top node NODE_NAME +``` + +{{ header }} Options + +```shell + --no-headers=false + If present, print output without headers + -l, --selector='' + Selector (label query) to filter on, supports `=`, `==`, and `!=`.(e.g. -l + key1=value1,key2=value2) + --show-capacity=false + Print node resources based on Capacity instead of Allocatable(default) of the nodes. + --sort-by='' + If non-empty, sort nodes list using specified field. The field can be either `cpu` or + `memory`. + --use-protocol-buffers=true + Enables using protocol-buffers to access Metrics API. +``` + +{{ header }} Options inherited from parent commands + +```shell + --as='' + Username to impersonate for the operation. User could be a regular user or a service + account in a namespace. + --as-group=[] + Group to impersonate for the operation, this flag can be repeated to specify multiple + groups. + --as-uid='' + UID to impersonate for the operation. + --cache-dir='~/.kube/cache' + Default cache directory + --certificate-authority='' + Path to a cert file for the certificate authority + --client-certificate='' + Path to a client certificate file for TLS + --client-key='' + Path to a client key file for TLS + --cluster='' + The name of the kubeconfig cluster to use + --context='' + The name of the kubeconfig context to use + --insecure-skip-tls-verify=false + If true, the server`s certificate will not be checked for validity. This will make your + HTTPS connections insecure + --kubeconfig='' + Path to the kubeconfig file to use for CLI requests. + --match-server-version=false + Require server version to match client version + -n, --namespace='' + If present, the namespace scope for this CLI request + --password='' + Password for basic authentication to the API server + --profile='none' + Name of profile to capture. One of (none|cpu|heap|goroutine|threadcreate|block|mutex) + --profile-output='profile.pprof' + Name of the file to write the profile to + --request-timeout='0' + The length of time to wait before giving up on a single server request. Non-zero values + should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don`t + timeout requests. + -s, --server='' + The address and port of the Kubernetes API server + --tls-server-name='' + Server name to use for server certificate validation. If it is not provided, the + hostname used to contact the server is used + --token='' + Bearer token for authentication to the API server + --user='' + The name of the kubeconfig user to use + --username='' + Username for basic authentication to the API server + --warnings-as-errors=false + Treat warnings received from the server as errors and exit with a non-zero exit code +``` + diff --git a/docs/_includes/reference/cli/werf_kubectl_top_node.short.md b/docs/_includes/reference/cli/werf_kubectl_top_node.short.md new file mode 100644 index 0000000000..74b4f82090 --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_top_node.short.md @@ -0,0 +1 @@ +display resource (CPU/memory) usage of nodes \ No newline at end of file diff --git a/docs/_includes/reference/cli/werf_kubectl_top_pod.md b/docs/_includes/reference/cli/werf_kubectl_top_pod.md new file mode 100644 index 0000000000..10ca1f5121 --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_top_pod.md @@ -0,0 +1,114 @@ +{% if include.header %} +{% assign header = include.header %} +{% else %} +{% assign header = "###" %} +{% endif %} +Display resource (CPU/memory) usage of pods. + + The 'top pod' command allows you to see the resource consumption of pods. + + Due to the metrics pipeline delay, they may be unavailable for a few minutes since pod creation. + +{{ header }} Syntax + +```shell +werf kubectl top pod [NAME | -l label] [options] +``` + +{{ header }} Examples + +```shell + # Show metrics for all pods in the default namespace + kubectl top pod + + # Show metrics for all pods in the given namespace + kubectl top pod --namespace=NAMESPACE + + # Show metrics for a given pod and its containers + kubectl top pod POD_NAME --containers + + # Show metrics for the pods defined by label name=myLabel + kubectl top pod -l name=myLabel +``` + +{{ header }} Options + +```shell + -A, --all-namespaces=false + If present, list the requested object(s) across all namespaces. Namespace in current + context is ignored even if specified with --namespace. + --containers=false + If present, print usage of containers within a pod. + --field-selector='' + Selector (field query) to filter on, supports `=`, `==`, and `!=`.(e.g. + --field-selector key1=value1,key2=value2). The server only supports a limited number of + field queries per type. + --no-headers=false + If present, print output without headers. + -l, --selector='' + Selector (label query) to filter on, supports `=`, `==`, and `!=`.(e.g. -l + key1=value1,key2=value2) + --sort-by='' + If non-empty, sort pods list using specified field. The field can be either `cpu` or + `memory`. + --use-protocol-buffers=true + Enables using protocol-buffers to access Metrics API. +``` + +{{ header }} Options inherited from parent commands + +```shell + --as='' + Username to impersonate for the operation. User could be a regular user or a service + account in a namespace. + --as-group=[] + Group to impersonate for the operation, this flag can be repeated to specify multiple + groups. + --as-uid='' + UID to impersonate for the operation. + --cache-dir='~/.kube/cache' + Default cache directory + --certificate-authority='' + Path to a cert file for the certificate authority + --client-certificate='' + Path to a client certificate file for TLS + --client-key='' + Path to a client key file for TLS + --cluster='' + The name of the kubeconfig cluster to use + --context='' + The name of the kubeconfig context to use + --insecure-skip-tls-verify=false + If true, the server`s certificate will not be checked for validity. This will make your + HTTPS connections insecure + --kubeconfig='' + Path to the kubeconfig file to use for CLI requests. + --match-server-version=false + Require server version to match client version + -n, --namespace='' + If present, the namespace scope for this CLI request + --password='' + Password for basic authentication to the API server + --profile='none' + Name of profile to capture. One of (none|cpu|heap|goroutine|threadcreate|block|mutex) + --profile-output='profile.pprof' + Name of the file to write the profile to + --request-timeout='0' + The length of time to wait before giving up on a single server request. Non-zero values + should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don`t + timeout requests. + -s, --server='' + The address and port of the Kubernetes API server + --tls-server-name='' + Server name to use for server certificate validation. If it is not provided, the + hostname used to contact the server is used + --token='' + Bearer token for authentication to the API server + --user='' + The name of the kubeconfig user to use + --username='' + Username for basic authentication to the API server + --warnings-as-errors=false + Treat warnings received from the server as errors and exit with a non-zero exit code +``` + diff --git a/docs/_includes/reference/cli/werf_kubectl_top_pod.short.md b/docs/_includes/reference/cli/werf_kubectl_top_pod.short.md new file mode 100644 index 0000000000..48278278b1 --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_top_pod.short.md @@ -0,0 +1 @@ +display resource (CPU/memory) usage of pods \ No newline at end of file diff --git a/docs/_includes/reference/cli/werf_kubectl_uncordon.md b/docs/_includes/reference/cli/werf_kubectl_uncordon.md new file mode 100644 index 0000000000..daa6b4d723 --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_uncordon.md @@ -0,0 +1,88 @@ +{% if include.header %} +{% assign header = include.header %} +{% else %} +{% assign header = "###" %} +{% endif %} +Mark node as schedulable. + +{{ header }} Syntax + +```shell +werf kubectl uncordon NODE [options] +``` + +{{ header }} Examples + +```shell + # Mark node "foo" as schedulable + kubectl uncordon foo +``` + +{{ header }} Options + +```shell + --dry-run='none' + Must be "none", "server", or "client". If client strategy, only print the object that + would be sent, without sending it. If server strategy, submit server-side request + without persisting the resource. + -l, --selector='' + Selector (label query) to filter on +``` + +{{ header }} Options inherited from parent commands + +```shell + --as='' + Username to impersonate for the operation. User could be a regular user or a service + account in a namespace. + --as-group=[] + Group to impersonate for the operation, this flag can be repeated to specify multiple + groups. + --as-uid='' + UID to impersonate for the operation. + --cache-dir='~/.kube/cache' + Default cache directory + --certificate-authority='' + Path to a cert file for the certificate authority + --client-certificate='' + Path to a client certificate file for TLS + --client-key='' + Path to a client key file for TLS + --cluster='' + The name of the kubeconfig cluster to use + --context='' + The name of the kubeconfig context to use + --insecure-skip-tls-verify=false + If true, the server`s certificate will not be checked for validity. This will make your + HTTPS connections insecure + --kubeconfig='' + Path to the kubeconfig file to use for CLI requests. + --match-server-version=false + Require server version to match client version + -n, --namespace='' + If present, the namespace scope for this CLI request + --password='' + Password for basic authentication to the API server + --profile='none' + Name of profile to capture. One of (none|cpu|heap|goroutine|threadcreate|block|mutex) + --profile-output='profile.pprof' + Name of the file to write the profile to + --request-timeout='0' + The length of time to wait before giving up on a single server request. Non-zero values + should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don`t + timeout requests. + -s, --server='' + The address and port of the Kubernetes API server + --tls-server-name='' + Server name to use for server certificate validation. If it is not provided, the + hostname used to contact the server is used + --token='' + Bearer token for authentication to the API server + --user='' + The name of the kubeconfig user to use + --username='' + Username for basic authentication to the API server + --warnings-as-errors=false + Treat warnings received from the server as errors and exit with a non-zero exit code +``` + diff --git a/docs/_includes/reference/cli/werf_kubectl_uncordon.short.md b/docs/_includes/reference/cli/werf_kubectl_uncordon.short.md new file mode 100644 index 0000000000..dccac81fb4 --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_uncordon.short.md @@ -0,0 +1 @@ +mark node as schedulable \ No newline at end of file diff --git a/docs/_includes/reference/cli/werf_kubectl_version.md b/docs/_includes/reference/cli/werf_kubectl_version.md new file mode 100644 index 0000000000..39e12d3904 --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_version.md @@ -0,0 +1,88 @@ +{% if include.header %} +{% assign header = include.header %} +{% else %} +{% assign header = "###" %} +{% endif %} +Print the client and server version information for the current context. + +{{ header }} Syntax + +```shell +werf kubectl version [flags] [options] +``` + +{{ header }} Examples + +```shell + # Print the client and server versions for the current context + kubectl version +``` + +{{ header }} Options + +```shell + --client=false + If true, shows client version only (no server required). + -o, --output='' + One of `yaml` or `json`. + --short=false + If true, print just the version number. +``` + +{{ header }} Options inherited from parent commands + +```shell + --as='' + Username to impersonate for the operation. User could be a regular user or a service + account in a namespace. + --as-group=[] + Group to impersonate for the operation, this flag can be repeated to specify multiple + groups. + --as-uid='' + UID to impersonate for the operation. + --cache-dir='~/.kube/cache' + Default cache directory + --certificate-authority='' + Path to a cert file for the certificate authority + --client-certificate='' + Path to a client certificate file for TLS + --client-key='' + Path to a client key file for TLS + --cluster='' + The name of the kubeconfig cluster to use + --context='' + The name of the kubeconfig context to use + --insecure-skip-tls-verify=false + If true, the server`s certificate will not be checked for validity. This will make your + HTTPS connections insecure + --kubeconfig='' + Path to the kubeconfig file to use for CLI requests. + --match-server-version=false + Require server version to match client version + -n, --namespace='' + If present, the namespace scope for this CLI request + --password='' + Password for basic authentication to the API server + --profile='none' + Name of profile to capture. One of (none|cpu|heap|goroutine|threadcreate|block|mutex) + --profile-output='profile.pprof' + Name of the file to write the profile to + --request-timeout='0' + The length of time to wait before giving up on a single server request. Non-zero values + should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don`t + timeout requests. + -s, --server='' + The address and port of the Kubernetes API server + --tls-server-name='' + Server name to use for server certificate validation. If it is not provided, the + hostname used to contact the server is used + --token='' + Bearer token for authentication to the API server + --user='' + The name of the kubeconfig user to use + --username='' + Username for basic authentication to the API server + --warnings-as-errors=false + Treat warnings received from the server as errors and exit with a non-zero exit code +``` + diff --git a/docs/_includes/reference/cli/werf_kubectl_version.short.md b/docs/_includes/reference/cli/werf_kubectl_version.short.md new file mode 100644 index 0000000000..2a15b13aa1 --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_version.short.md @@ -0,0 +1 @@ +print the client and server version information \ No newline at end of file diff --git a/docs/_includes/reference/cli/werf_kubectl_wait.md b/docs/_includes/reference/cli/werf_kubectl_wait.md new file mode 100644 index 0000000000..fe055b7dcc --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_wait.md @@ -0,0 +1,136 @@ +{% if include.header %} +{% assign header = include.header %} +{% else %} +{% assign header = "###" %} +{% endif %} +Experimental: Wait for a specific condition on one or many resources. + + The command takes multiple resources and waits until the specified condition is seen in the Status field of every given resource. + + Alternatively, the command can wait for the given set of resources to be deleted by providing the "delete" keyword as the value to the --for flag. + + A successful message will be printed to stdout indicating when the specified condition has been met. You can use -o option to change to output destination. + +{{ header }} Syntax + +```shell +werf kubectl wait ([-f FILENAME] | resource.group/resource.name | resource.group [(-l label | --all)]) [--for=delete|--for condition=available|--for=jsonpath='{}'=value] [options] +``` + +{{ header }} Examples + +```shell + # Wait for the pod "busybox1" to contain the status condition of type "Ready" + kubectl wait --for=condition=Ready pod/busybox1 + + # The default value of status condition is true; you can set it to false + kubectl wait --for=condition=Ready=false pod/busybox1 + + # Wait for the pod "busybox1" to contain the status phase to be "Running". + kubectl wait --for=jsonpath='{.status.phase}'=Running pod/busybox1 + + # Wait for the pod "busybox1" to be deleted, with a timeout of 60s, after having issued the "delete" command + kubectl delete pod/busybox1 + kubectl wait --for=delete pod/busybox1 --timeout=60s +``` + +{{ header }} Options + +```shell + --all=false + Select all resources in the namespace of the specified resource types + -A, --all-namespaces=false + If present, list the requested object(s) across all namespaces. Namespace in current + context is ignored even if specified with --namespace. + --allow-missing-template-keys=true + If true, ignore any errors in templates when a field or map key is missing in the + template. Only applies to golang and jsonpath output formats. + --field-selector='' + Selector (field query) to filter on, supports `=`, `==`, and `!=`.(e.g. + --field-selector key1=value1,key2=value2). The server only supports a limited number of + field queries per type. + -f, --filename=[] + identifying the resource. + --for='' + The condition to wait on: [delete|condition=condition-name|jsonpath=`{JSONPath + expression}`=JSONPath Condition]. The default status value of condition-name is true, + you can set false with condition=condition-name=false. + --local=false + If true, annotation will NOT contact api-server but run locally. + -o, --output='' + Output format. One of: json|yaml|name|go-template|go-template-file|template|templatefile + |jsonpath|jsonpath-as-json|jsonpath-file. + -R, --recursive=true + Process the directory used in -f, --filename recursively. Useful when you want to + manage related manifests organized within the same directory. + -l, --selector='' + Selector (label query) to filter on, supports `=`, `==`, and `!=`.(e.g. -l + key1=value1,key2=value2) + --show-managed-fields=false + If true, keep the managedFields when printing objects in JSON or YAML format. + --template='' + Template string or path to template file to use when -o=go-template, + -o=go-template-file. The template format is golang templates + [http://golang.org/pkg/text/template/#pkg-overview]. + --timeout=30s + The length of time to wait before giving up. Zero means check once and don`t wait, + negative means wait for a week. +``` + +{{ header }} Options inherited from parent commands + +```shell + --as='' + Username to impersonate for the operation. User could be a regular user or a service + account in a namespace. + --as-group=[] + Group to impersonate for the operation, this flag can be repeated to specify multiple + groups. + --as-uid='' + UID to impersonate for the operation. + --cache-dir='~/.kube/cache' + Default cache directory + --certificate-authority='' + Path to a cert file for the certificate authority + --client-certificate='' + Path to a client certificate file for TLS + --client-key='' + Path to a client key file for TLS + --cluster='' + The name of the kubeconfig cluster to use + --context='' + The name of the kubeconfig context to use + --insecure-skip-tls-verify=false + If true, the server`s certificate will not be checked for validity. This will make your + HTTPS connections insecure + --kubeconfig='' + Path to the kubeconfig file to use for CLI requests. + --match-server-version=false + Require server version to match client version + -n, --namespace='' + If present, the namespace scope for this CLI request + --password='' + Password for basic authentication to the API server + --profile='none' + Name of profile to capture. One of (none|cpu|heap|goroutine|threadcreate|block|mutex) + --profile-output='profile.pprof' + Name of the file to write the profile to + --request-timeout='0' + The length of time to wait before giving up on a single server request. Non-zero values + should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don`t + timeout requests. + -s, --server='' + The address and port of the Kubernetes API server + --tls-server-name='' + Server name to use for server certificate validation. If it is not provided, the + hostname used to contact the server is used + --token='' + Bearer token for authentication to the API server + --user='' + The name of the kubeconfig user to use + --username='' + Username for basic authentication to the API server + --warnings-as-errors=false + Treat warnings received from the server as errors and exit with a non-zero exit code +``` + diff --git a/docs/_includes/reference/cli/werf_kubectl_wait.short.md b/docs/_includes/reference/cli/werf_kubectl_wait.short.md new file mode 100644 index 0000000000..bd6dc99bca --- /dev/null +++ b/docs/_includes/reference/cli/werf_kubectl_wait.short.md @@ -0,0 +1 @@ +experimental: Wait for a specific condition on one or many resources \ No newline at end of file diff --git a/docs/pages_en/reference/cli/overview.md b/docs/pages_en/reference/cli/overview.md index 091880f48f..c5732a1987 100644 --- a/docs/pages_en/reference/cli/overview.md +++ b/docs/pages_en/reference/cli/overview.md @@ -18,6 +18,7 @@ Helper commands: - [werf build]({{ "/reference/cli/werf_build.html" | true_relative_url }}) — {% include /reference/cli/werf_build.short.md %}. - [werf export]({{ "/reference/cli/werf_export.html" | true_relative_url }}) — {% include /reference/cli/werf_export.short.md %}. - [werf run]({{ "/reference/cli/werf_run.html" | true_relative_url }}) — {% include /reference/cli/werf_run.short.md %}. + - [werf kube-run]({{ "/reference/cli/werf_kube_run.html" | true_relative_url }}) — {% include /reference/cli/werf_kube_run.short.md %}. - [werf compose]({{ "/reference/cli/werf_compose_config.html" | true_relative_url }}) — {% include /reference/cli/werf_compose_config.short.md %}. - [werf slugify]({{ "/reference/cli/werf_slugify.html" | true_relative_url }}) — {% include /reference/cli/werf_slugify.short.md %}. - [werf render]({{ "/reference/cli/werf_render.html" | true_relative_url }}) — {% include /reference/cli/werf_render.short.md %}. @@ -28,6 +29,7 @@ Low-level management commands: - [werf host]({{ "/reference/cli/werf_host_cleanup.html" | true_relative_url }}) — {% include /reference/cli/werf_host_cleanup.short.md %}. - [werf helm]({{ "/reference/cli/werf_helm_create.html" | true_relative_url }}) — {% include /reference/cli/werf_helm_create.short.md %}. - [werf cr]({{ "/reference/cli/werf_cr_login.html" | true_relative_url }}) — {% include /reference/cli/werf_cr_login.short.md %}. + - [werf kubectl]({{ "/reference/cli/werf_kubectl_alpha.html" | true_relative_url }}) — {% include /reference/cli/werf_kubectl_alpha.short.md %}. Other commands: - [werf synchronization]({{ "/reference/cli/werf_synchronization.html" | true_relative_url }}) — {% include /reference/cli/werf_synchronization.short.md %}. diff --git a/docs/pages_en/reference/cli/werf_kube_run.md b/docs/pages_en/reference/cli/werf_kube_run.md new file mode 100644 index 0000000000..a347fd09fd --- /dev/null +++ b/docs/pages_en/reference/cli/werf_kube_run.md @@ -0,0 +1,6 @@ +--- +title: werf kube-run +permalink: reference/cli/werf_kube_run.html +--- + +{% include /reference/cli/werf_kube_run.md %} diff --git a/docs/pages_en/reference/cli/werf_kubectl.md b/docs/pages_en/reference/cli/werf_kubectl.md new file mode 100644 index 0000000000..3bfecdc1b2 --- /dev/null +++ b/docs/pages_en/reference/cli/werf_kubectl.md @@ -0,0 +1,6 @@ +--- +title: werf kubectl +permalink: reference/cli/werf_kubectl.html +--- + +{% include /reference/cli/werf_kubectl.md %} diff --git a/docs/pages_en/reference/cli/werf_kubectl_alpha.md b/docs/pages_en/reference/cli/werf_kubectl_alpha.md new file mode 100644 index 0000000000..bcd954e6ae --- /dev/null +++ b/docs/pages_en/reference/cli/werf_kubectl_alpha.md @@ -0,0 +1,6 @@ +--- +title: werf kubectl alpha +permalink: reference/cli/werf_kubectl_alpha.html +--- + +{% include /reference/cli/werf_kubectl_alpha.md %} diff --git a/docs/pages_en/reference/cli/werf_kubectl_alpha_events.md b/docs/pages_en/reference/cli/werf_kubectl_alpha_events.md new file mode 100644 index 0000000000..85dbf3d902 --- /dev/null +++ b/docs/pages_en/reference/cli/werf_kubectl_alpha_events.md @@ -0,0 +1,6 @@ +--- +title: werf kubectl alpha events +permalink: reference/cli/werf_kubectl_alpha_events.html +--- + +{% include /reference/cli/werf_kubectl_alpha_events.md %} diff --git a/docs/pages_en/reference/cli/werf_kubectl_annotate.md b/docs/pages_en/reference/cli/werf_kubectl_annotate.md new file mode 100644 index 0000000000..e5c58317e4 --- /dev/null +++ b/docs/pages_en/reference/cli/werf_kubectl_annotate.md @@ -0,0 +1,6 @@ +--- +title: werf kubectl annotate +permalink: reference/cli/werf_kubectl_annotate.html +--- + +{% include /reference/cli/werf_kubectl_annotate.md %} diff --git a/docs/pages_en/reference/cli/werf_kubectl_api_resources.md b/docs/pages_en/reference/cli/werf_kubectl_api_resources.md new file mode 100644 index 0000000000..a8509e288e --- /dev/null +++ b/docs/pages_en/reference/cli/werf_kubectl_api_resources.md @@ -0,0 +1,6 @@ +--- +title: werf kubectl api-resources +permalink: reference/cli/werf_kubectl_api_resources.html +--- + +{% include /reference/cli/werf_kubectl_api_resources.md %} diff --git a/docs/pages_en/reference/cli/werf_kubectl_api_versions.md b/docs/pages_en/reference/cli/werf_kubectl_api_versions.md new file mode 100644 index 0000000000..d6242e40f4 --- /dev/null +++ b/docs/pages_en/reference/cli/werf_kubectl_api_versions.md @@ -0,0 +1,6 @@ +--- +title: werf kubectl api-versions +permalink: reference/cli/werf_kubectl_api_versions.html +--- + +{% include /reference/cli/werf_kubectl_api_versions.md %} diff --git a/docs/pages_en/reference/cli/werf_kubectl_apply.md b/docs/pages_en/reference/cli/werf_kubectl_apply.md new file mode 100644 index 0000000000..c58e261149 --- /dev/null +++ b/docs/pages_en/reference/cli/werf_kubectl_apply.md @@ -0,0 +1,6 @@ +--- +title: werf kubectl apply +permalink: reference/cli/werf_kubectl_apply.html +--- + +{% include /reference/cli/werf_kubectl_apply.md %} diff --git a/docs/pages_en/reference/cli/werf_kubectl_apply_edit_last_applied.md b/docs/pages_en/reference/cli/werf_kubectl_apply_edit_last_applied.md new file mode 100644 index 0000000000..b303d2faa9 --- /dev/null +++ b/docs/pages_en/reference/cli/werf_kubectl_apply_edit_last_applied.md @@ -0,0 +1,6 @@ +--- +title: werf kubectl apply edit-last-applied +permalink: reference/cli/werf_kubectl_apply_edit_last_applied.html +--- + +{% include /reference/cli/werf_kubectl_apply_edit_last_applied.md %} diff --git a/docs/pages_en/reference/cli/werf_kubectl_apply_set_last_applied.md b/docs/pages_en/reference/cli/werf_kubectl_apply_set_last_applied.md new file mode 100644 index 0000000000..e50f07611b --- /dev/null +++ b/docs/pages_en/reference/cli/werf_kubectl_apply_set_last_applied.md @@ -0,0 +1,6 @@ +--- +title: werf kubectl apply set-last-applied +permalink: reference/cli/werf_kubectl_apply_set_last_applied.html +--- + +{% include /reference/cli/werf_kubectl_apply_set_last_applied.md %} diff --git a/docs/pages_en/reference/cli/werf_kubectl_apply_view_last_applied.md b/docs/pages_en/reference/cli/werf_kubectl_apply_view_last_applied.md new file mode 100644 index 0000000000..585bbd4478 --- /dev/null +++ b/docs/pages_en/reference/cli/werf_kubectl_apply_view_last_applied.md @@ -0,0 +1,6 @@ +--- +title: werf kubectl apply view-last-applied +permalink: reference/cli/werf_kubectl_apply_view_last_applied.html +--- + +{% include /reference/cli/werf_kubectl_apply_view_last_applied.md %} diff --git a/docs/pages_en/reference/cli/werf_kubectl_attach.md b/docs/pages_en/reference/cli/werf_kubectl_attach.md new file mode 100644 index 0000000000..0ac38b27ef --- /dev/null +++ b/docs/pages_en/reference/cli/werf_kubectl_attach.md @@ -0,0 +1,6 @@ +--- +title: werf kubectl attach +permalink: reference/cli/werf_kubectl_attach.html +--- + +{% include /reference/cli/werf_kubectl_attach.md %} diff --git a/docs/pages_en/reference/cli/werf_kubectl_auth.md b/docs/pages_en/reference/cli/werf_kubectl_auth.md new file mode 100644 index 0000000000..f77adf592d --- /dev/null +++ b/docs/pages_en/reference/cli/werf_kubectl_auth.md @@ -0,0 +1,6 @@ +--- +title: werf kubectl auth +permalink: reference/cli/werf_kubectl_auth.html +--- + +{% include /reference/cli/werf_kubectl_auth.md %} diff --git a/docs/pages_en/reference/cli/werf_kubectl_auth_can_i.md b/docs/pages_en/reference/cli/werf_kubectl_auth_can_i.md new file mode 100644 index 0000000000..59b16c0068 --- /dev/null +++ b/docs/pages_en/reference/cli/werf_kubectl_auth_can_i.md @@ -0,0 +1,6 @@ +--- +title: werf kubectl auth can-i +permalink: reference/cli/werf_kubectl_auth_can_i.html +--- + +{% include /reference/cli/werf_kubectl_auth_can_i.md %} diff --git a/docs/pages_en/reference/cli/werf_kubectl_auth_reconcile.md b/docs/pages_en/reference/cli/werf_kubectl_auth_reconcile.md new file mode 100644 index 0000000000..2b3d2edd8c --- /dev/null +++ b/docs/pages_en/reference/cli/werf_kubectl_auth_reconcile.md @@ -0,0 +1,6 @@ +--- +title: werf kubectl auth reconcile +permalink: reference/cli/werf_kubectl_auth_reconcile.html +--- + +{% include /reference/cli/werf_kubectl_auth_reconcile.md %} diff --git a/docs/pages_en/reference/cli/werf_kubectl_autoscale.md b/docs/pages_en/reference/cli/werf_kubectl_autoscale.md new file mode 100644 index 0000000000..60182a2f45 --- /dev/null +++ b/docs/pages_en/reference/cli/werf_kubectl_autoscale.md @@ -0,0 +1,6 @@ +--- +title: werf kubectl autoscale +permalink: reference/cli/werf_kubectl_autoscale.html +--- + +{% include /reference/cli/werf_kubectl_autoscale.md %} diff --git a/docs/pages_en/reference/cli/werf_kubectl_certificate.md b/docs/pages_en/reference/cli/werf_kubectl_certificate.md new file mode 100644 index 0000000000..fdb137fdd6 --- /dev/null +++ b/docs/pages_en/reference/cli/werf_kubectl_certificate.md @@ -0,0 +1,6 @@ +--- +title: werf kubectl certificate +permalink: reference/cli/werf_kubectl_certificate.html +--- + +{% include /reference/cli/werf_kubectl_certificate.md %} diff --git a/docs/pages_en/reference/cli/werf_kubectl_certificate_approve.md b/docs/pages_en/reference/cli/werf_kubectl_certificate_approve.md new file mode 100644 index 0000000000..16efe5e44f --- /dev/null +++ b/docs/pages_en/reference/cli/werf_kubectl_certificate_approve.md @@ -0,0 +1,6 @@ +--- +title: werf kubectl certificate approve +permalink: reference/cli/werf_kubectl_certificate_approve.html +--- + +{% include /reference/cli/werf_kubectl_certificate_approve.md %} diff --git a/docs/pages_en/reference/cli/werf_kubectl_certificate_deny.md b/docs/pages_en/reference/cli/werf_kubectl_certificate_deny.md new file mode 100644 index 0000000000..118747c6ce --- /dev/null +++ b/docs/pages_en/reference/cli/werf_kubectl_certificate_deny.md @@ -0,0 +1,6 @@ +--- +title: werf kubectl certificate deny +permalink: reference/cli/werf_kubectl_certificate_deny.html +--- + +{% include /reference/cli/werf_kubectl_certificate_deny.md %} diff --git a/docs/pages_en/reference/cli/werf_kubectl_cluster_info.md b/docs/pages_en/reference/cli/werf_kubectl_cluster_info.md new file mode 100644 index 0000000000..606638440b --- /dev/null +++ b/docs/pages_en/reference/cli/werf_kubectl_cluster_info.md @@ -0,0 +1,6 @@ +--- +title: werf kubectl cluster-info +permalink: reference/cli/werf_kubectl_cluster_info.html +--- + +{% include /reference/cli/werf_kubectl_cluster_info.md %} diff --git a/docs/pages_en/reference/cli/werf_kubectl_cluster_info_dump.md b/docs/pages_en/reference/cli/werf_kubectl_cluster_info_dump.md new file mode 100644 index 0000000000..54a4284a8f --- /dev/null +++ b/docs/pages_en/reference/cli/werf_kubectl_cluster_info_dump.md @@ -0,0 +1,6 @@ +--- +title: werf kubectl cluster-info dump +permalink: reference/cli/werf_kubectl_cluster_info_dump.html +--- + +{% include /reference/cli/werf_kubectl_cluster_info_dump.md %} diff --git a/docs/pages_en/reference/cli/werf_kubectl_completion.md b/docs/pages_en/reference/cli/werf_kubectl_completion.md new file mode 100644 index 0000000000..4110f34095 --- /dev/null +++ b/docs/pages_en/reference/cli/werf_kubectl_completion.md @@ -0,0 +1,6 @@ +--- +title: werf kubectl completion +permalink: reference/cli/werf_kubectl_completion.html +--- + +{% include /reference/cli/werf_kubectl_completion.md %} diff --git a/docs/pages_en/reference/cli/werf_kubectl_config.md b/docs/pages_en/reference/cli/werf_kubectl_config.md new file mode 100644 index 0000000000..d5f391b962 --- /dev/null +++ b/docs/pages_en/reference/cli/werf_kubectl_config.md @@ -0,0 +1,6 @@ +--- +title: werf kubectl config +permalink: reference/cli/werf_kubectl_config.html +--- + +{% include /reference/cli/werf_kubectl_config.md %} diff --git a/docs/pages_en/reference/cli/werf_kubectl_config_current_context.md b/docs/pages_en/reference/cli/werf_kubectl_config_current_context.md new file mode 100644 index 0000000000..630f38fadc --- /dev/null +++ b/docs/pages_en/reference/cli/werf_kubectl_config_current_context.md @@ -0,0 +1,6 @@ +--- +title: werf kubectl config current-context +permalink: reference/cli/werf_kubectl_config_current_context.html +--- + +{% include /reference/cli/werf_kubectl_config_current_context.md %} diff --git a/docs/pages_en/reference/cli/werf_kubectl_config_delete_cluster.md b/docs/pages_en/reference/cli/werf_kubectl_config_delete_cluster.md new file mode 100644 index 0000000000..d12250ea41 --- /dev/null +++ b/docs/pages_en/reference/cli/werf_kubectl_config_delete_cluster.md @@ -0,0 +1,6 @@ +--- +title: werf kubectl config delete-cluster +permalink: reference/cli/werf_kubectl_config_delete_cluster.html +--- + +{% include /reference/cli/werf_kubectl_config_delete_cluster.md %} diff --git a/docs/pages_en/reference/cli/werf_kubectl_config_delete_context.md b/docs/pages_en/reference/cli/werf_kubectl_config_delete_context.md new file mode 100644 index 0000000000..b897e50717 --- /dev/null +++ b/docs/pages_en/reference/cli/werf_kubectl_config_delete_context.md @@ -0,0 +1,6 @@ +--- +title: werf kubectl config delete-context +permalink: reference/cli/werf_kubectl_config_delete_context.html +--- + +{% include /reference/cli/werf_kubectl_config_delete_context.md %} diff --git a/docs/pages_en/reference/cli/werf_kubectl_config_delete_user.md b/docs/pages_en/reference/cli/werf_kubectl_config_delete_user.md new file mode 100644 index 0000000000..a2cb7a96b6 --- /dev/null +++ b/docs/pages_en/reference/cli/werf_kubectl_config_delete_user.md @@ -0,0 +1,6 @@ +--- +title: werf kubectl config delete-user +permalink: reference/cli/werf_kubectl_config_delete_user.html +--- + +{% include /reference/cli/werf_kubectl_config_delete_user.md %} diff --git a/docs/pages_en/reference/cli/werf_kubectl_config_get_clusters.md b/docs/pages_en/reference/cli/werf_kubectl_config_get_clusters.md new file mode 100644 index 0000000000..c160fb3dec --- /dev/null +++ b/docs/pages_en/reference/cli/werf_kubectl_config_get_clusters.md @@ -0,0 +1,6 @@ +--- +title: werf kubectl config get-clusters +permalink: reference/cli/werf_kubectl_config_get_clusters.html +--- + +{% include /reference/cli/werf_kubectl_config_get_clusters.md %} diff --git a/docs/pages_en/reference/cli/werf_kubectl_config_get_contexts.md b/docs/pages_en/reference/cli/werf_kubectl_config_get_contexts.md new file mode 100644 index 0000000000..aef6ae52ae --- /dev/null +++ b/docs/pages_en/reference/cli/werf_kubectl_config_get_contexts.md @@ -0,0 +1,6 @@ +--- +title: werf kubectl config get-contexts +permalink: reference/cli/werf_kubectl_config_get_contexts.html +--- + +{% include /reference/cli/werf_kubectl_config_get_contexts.md %} diff --git a/docs/pages_en/reference/cli/werf_kubectl_config_get_users.md b/docs/pages_en/reference/cli/werf_kubectl_config_get_users.md new file mode 100644 index 0000000000..c2693041f7 --- /dev/null +++ b/docs/pages_en/reference/cli/werf_kubectl_config_get_users.md @@ -0,0 +1,6 @@ +--- +title: werf kubectl config get-users +permalink: reference/cli/werf_kubectl_config_get_users.html +--- + +{% include /reference/cli/werf_kubectl_config_get_users.md %} diff --git a/docs/pages_en/reference/cli/werf_kubectl_config_rename_context.md b/docs/pages_en/reference/cli/werf_kubectl_config_rename_context.md new file mode 100644 index 0000000000..ce5f3c569b --- /dev/null +++ b/docs/pages_en/reference/cli/werf_kubectl_config_rename_context.md @@ -0,0 +1,6 @@ +--- +title: werf kubectl config rename-context +permalink: reference/cli/werf_kubectl_config_rename_context.html +--- + +{% include /reference/cli/werf_kubectl_config_rename_context.md %} diff --git a/docs/pages_en/reference/cli/werf_kubectl_config_set.md b/docs/pages_en/reference/cli/werf_kubectl_config_set.md new file mode 100644 index 0000000000..04a011b00b --- /dev/null +++ b/docs/pages_en/reference/cli/werf_kubectl_config_set.md @@ -0,0 +1,6 @@ +--- +title: werf kubectl config set +permalink: reference/cli/werf_kubectl_config_set.html +--- + +{% include /reference/cli/werf_kubectl_config_set.md %} diff --git a/docs/pages_en/reference/cli/werf_kubectl_config_set_cluster.md b/docs/pages_en/reference/cli/werf_kubectl_config_set_cluster.md new file mode 100644 index 0000000000..d536a561a2 --- /dev/null +++ b/docs/pages_en/reference/cli/werf_kubectl_config_set_cluster.md @@ -0,0 +1,6 @@ +--- +title: werf kubectl config set-cluster +permalink: reference/cli/werf_kubectl_config_set_cluster.html +--- + +{% include /reference/cli/werf_kubectl_config_set_cluster.md %} diff --git a/docs/pages_en/reference/cli/werf_kubectl_config_set_context.md b/docs/pages_en/reference/cli/werf_kubectl_config_set_context.md new file mode 100644 index 0000000000..0808a5b10a --- /dev/null +++ b/docs/pages_en/reference/cli/werf_kubectl_config_set_context.md @@ -0,0 +1,6 @@ +--- +title: werf kubectl config set-context +permalink: reference/cli/werf_kubectl_config_set_context.html +--- + +{% include /reference/cli/werf_kubectl_config_set_context.md %} diff --git a/docs/pages_en/reference/cli/werf_kubectl_config_set_credentials.md b/docs/pages_en/reference/cli/werf_kubectl_config_set_credentials.md new file mode 100644 index 0000000000..6b25b63ce9 --- /dev/null +++ b/docs/pages_en/reference/cli/werf_kubectl_config_set_credentials.md @@ -0,0 +1,6 @@ +--- +title: werf kubectl config set-credentials +permalink: reference/cli/werf_kubectl_config_set_credentials.html +--- + +{% include /reference/cli/werf_kubectl_config_set_credentials.md %} diff --git a/docs/pages_en/reference/cli/werf_kubectl_config_unset.md b/docs/pages_en/reference/cli/werf_kubectl_config_unset.md new file mode 100644 index 0000000000..a30ad2b60f --- /dev/null +++ b/docs/pages_en/reference/cli/werf_kubectl_config_unset.md @@ -0,0 +1,6 @@ +--- +title: werf kubectl config unset +permalink: reference/cli/werf_kubectl_config_unset.html +--- + +{% include /reference/cli/werf_kubectl_config_unset.md %} diff --git a/docs/pages_en/reference/cli/werf_kubectl_config_use_context.md b/docs/pages_en/reference/cli/werf_kubectl_config_use_context.md new file mode 100644 index 0000000000..717ec8fa51 --- /dev/null +++ b/docs/pages_en/reference/cli/werf_kubectl_config_use_context.md @@ -0,0 +1,6 @@ +--- +title: werf kubectl config use-context +permalink: reference/cli/werf_kubectl_config_use_context.html +--- + +{% include /reference/cli/werf_kubectl_config_use_context.md %} diff --git a/docs/pages_en/reference/cli/werf_kubectl_config_view.md b/docs/pages_en/reference/cli/werf_kubectl_config_view.md new file mode 100644 index 0000000000..c4ffbae53e --- /dev/null +++ b/docs/pages_en/reference/cli/werf_kubectl_config_view.md @@ -0,0 +1,6 @@ +--- +title: werf kubectl config view +permalink: reference/cli/werf_kubectl_config_view.html +--- + +{% include /reference/cli/werf_kubectl_config_view.md %} diff --git a/docs/pages_en/reference/cli/werf_kubectl_cordon.md b/docs/pages_en/reference/cli/werf_kubectl_cordon.md new file mode 100644 index 0000000000..690f56585e --- /dev/null +++ b/docs/pages_en/reference/cli/werf_kubectl_cordon.md @@ -0,0 +1,6 @@ +--- +title: werf kubectl cordon +permalink: reference/cli/werf_kubectl_cordon.html +--- + +{% include /reference/cli/werf_kubectl_cordon.md %} diff --git a/docs/pages_en/reference/cli/werf_kubectl_cp.md b/docs/pages_en/reference/cli/werf_kubectl_cp.md new file mode 100644 index 0000000000..71a5e0de05 --- /dev/null +++ b/docs/pages_en/reference/cli/werf_kubectl_cp.md @@ -0,0 +1,6 @@ +--- +title: werf kubectl cp +permalink: reference/cli/werf_kubectl_cp.html +--- + +{% include /reference/cli/werf_kubectl_cp.md %} diff --git a/docs/pages_en/reference/cli/werf_kubectl_create.md b/docs/pages_en/reference/cli/werf_kubectl_create.md new file mode 100644 index 0000000000..80c5d15394 --- /dev/null +++ b/docs/pages_en/reference/cli/werf_kubectl_create.md @@ -0,0 +1,6 @@ +--- +title: werf kubectl create +permalink: reference/cli/werf_kubectl_create.html +--- + +{% include /reference/cli/werf_kubectl_create.md %} diff --git a/docs/pages_en/reference/cli/werf_kubectl_create_clusterrole.md b/docs/pages_en/reference/cli/werf_kubectl_create_clusterrole.md new file mode 100644 index 0000000000..1ed666a10d --- /dev/null +++ b/docs/pages_en/reference/cli/werf_kubectl_create_clusterrole.md @@ -0,0 +1,6 @@ +--- +title: werf kubectl create clusterrole +permalink: reference/cli/werf_kubectl_create_clusterrole.html +--- + +{% include /reference/cli/werf_kubectl_create_clusterrole.md %} diff --git a/docs/pages_en/reference/cli/werf_kubectl_create_clusterrolebinding.md b/docs/pages_en/reference/cli/werf_kubectl_create_clusterrolebinding.md new file mode 100644 index 0000000000..f5101a6b93 --- /dev/null +++ b/docs/pages_en/reference/cli/werf_kubectl_create_clusterrolebinding.md @@ -0,0 +1,6 @@ +--- +title: werf kubectl create clusterrolebinding +permalink: reference/cli/werf_kubectl_create_clusterrolebinding.html +--- + +{% include /reference/cli/werf_kubectl_create_clusterrolebinding.md %} diff --git a/docs/pages_en/reference/cli/werf_kubectl_create_configmap.md b/docs/pages_en/reference/cli/werf_kubectl_create_configmap.md new file mode 100644 index 0000000000..84e512bbac --- /dev/null +++ b/docs/pages_en/reference/cli/werf_kubectl_create_configmap.md @@ -0,0 +1,6 @@ +--- +title: werf kubectl create configmap +permalink: reference/cli/werf_kubectl_create_configmap.html +--- + +{% include /reference/cli/werf_kubectl_create_configmap.md %} diff --git a/docs/pages_en/reference/cli/werf_kubectl_create_cronjob.md b/docs/pages_en/reference/cli/werf_kubectl_create_cronjob.md new file mode 100644 index 0000000000..2bc6bcb884 --- /dev/null +++ b/docs/pages_en/reference/cli/werf_kubectl_create_cronjob.md @@ -0,0 +1,6 @@ +--- +title: werf kubectl create cronjob +permalink: reference/cli/werf_kubectl_create_cronjob.html +--- + +{% include /reference/cli/werf_kubectl_create_cronjob.md %} diff --git a/docs/pages_en/reference/cli/werf_kubectl_create_deployment.md b/docs/pages_en/reference/cli/werf_kubectl_create_deployment.md new file mode 100644 index 0000000000..05a8bf7b9d --- /dev/null +++ b/docs/pages_en/reference/cli/werf_kubectl_create_deployment.md @@ -0,0 +1,6 @@ +--- +title: werf kubectl create deployment +permalink: reference/cli/werf_kubectl_create_deployment.html +--- + +{% include /reference/cli/werf_kubectl_create_deployment.md %} diff --git a/docs/pages_en/reference/cli/werf_kubectl_create_ingress.md b/docs/pages_en/reference/cli/werf_kubectl_create_ingress.md new file mode 100644 index 0000000000..15c30ec75b --- /dev/null +++ b/docs/pages_en/reference/cli/werf_kubectl_create_ingress.md @@ -0,0 +1,6 @@ +--- +title: werf kubectl create ingress +permalink: reference/cli/werf_kubectl_create_ingress.html +--- + +{% include /reference/cli/werf_kubectl_create_ingress.md %} diff --git a/docs/pages_en/reference/cli/werf_kubectl_create_job.md b/docs/pages_en/reference/cli/werf_kubectl_create_job.md new file mode 100644 index 0000000000..b9f430310e --- /dev/null +++ b/docs/pages_en/reference/cli/werf_kubectl_create_job.md @@ -0,0 +1,6 @@ +--- +title: werf kubectl create job +permalink: reference/cli/werf_kubectl_create_job.html +--- + +{% include /reference/cli/werf_kubectl_create_job.md %} diff --git a/docs/pages_en/reference/cli/werf_kubectl_create_namespace.md b/docs/pages_en/reference/cli/werf_kubectl_create_namespace.md new file mode 100644 index 0000000000..40981d4cbc --- /dev/null +++ b/docs/pages_en/reference/cli/werf_kubectl_create_namespace.md @@ -0,0 +1,6 @@ +--- +title: werf kubectl create namespace +permalink: reference/cli/werf_kubectl_create_namespace.html +--- + +{% include /reference/cli/werf_kubectl_create_namespace.md %} diff --git a/docs/pages_en/reference/cli/werf_kubectl_create_poddisruptionbudget.md b/docs/pages_en/reference/cli/werf_kubectl_create_poddisruptionbudget.md new file mode 100644 index 0000000000..89fee21306 --- /dev/null +++ b/docs/pages_en/reference/cli/werf_kubectl_create_poddisruptionbudget.md @@ -0,0 +1,6 @@ +--- +title: werf kubectl create poddisruptionbudget +permalink: reference/cli/werf_kubectl_create_poddisruptionbudget.html +--- + +{% include /reference/cli/werf_kubectl_create_poddisruptionbudget.md %} diff --git a/docs/pages_en/reference/cli/werf_kubectl_create_priorityclass.md b/docs/pages_en/reference/cli/werf_kubectl_create_priorityclass.md new file mode 100644 index 0000000000..766925b12e --- /dev/null +++ b/docs/pages_en/reference/cli/werf_kubectl_create_priorityclass.md @@ -0,0 +1,6 @@ +--- +title: werf kubectl create priorityclass +permalink: reference/cli/werf_kubectl_create_priorityclass.html +--- + +{% include /reference/cli/werf_kubectl_create_priorityclass.md %} diff --git a/docs/pages_en/reference/cli/werf_kubectl_create_quota.md b/docs/pages_en/reference/cli/werf_kubectl_create_quota.md new file mode 100644 index 0000000000..cbe3340148 --- /dev/null +++ b/docs/pages_en/reference/cli/werf_kubectl_create_quota.md @@ -0,0 +1,6 @@ +--- +title: werf kubectl create quota +permalink: reference/cli/werf_kubectl_create_quota.html +--- + +{% include /reference/cli/werf_kubectl_create_quota.md %} diff --git a/docs/pages_en/reference/cli/werf_kubectl_create_role.md b/docs/pages_en/reference/cli/werf_kubectl_create_role.md new file mode 100644 index 0000000000..2affcb4b12 --- /dev/null +++ b/docs/pages_en/reference/cli/werf_kubectl_create_role.md @@ -0,0 +1,6 @@ +--- +title: werf kubectl create role +permalink: reference/cli/werf_kubectl_create_role.html +--- + +{% include /reference/cli/werf_kubectl_create_role.md %} diff --git a/docs/pages_en/reference/cli/werf_kubectl_create_rolebinding.md b/docs/pages_en/reference/cli/werf_kubectl_create_rolebinding.md new file mode 100644 index 0000000000..a1f07baaaf --- /dev/null +++ b/docs/pages_en/reference/cli/werf_kubectl_create_rolebinding.md @@ -0,0 +1,6 @@ +--- +title: werf kubectl create rolebinding +permalink: reference/cli/werf_kubectl_create_rolebinding.html +--- + +{% include /reference/cli/werf_kubectl_create_rolebinding.md %} diff --git a/docs/pages_en/reference/cli/werf_kubectl_create_secret.md b/docs/pages_en/reference/cli/werf_kubectl_create_secret.md new file mode 100644 index 0000000000..6ad08ff455 --- /dev/null +++ b/docs/pages_en/reference/cli/werf_kubectl_create_secret.md @@ -0,0 +1,6 @@ +--- +title: werf kubectl create secret +permalink: reference/cli/werf_kubectl_create_secret.html +--- + +{% include /reference/cli/werf_kubectl_create_secret.md %} diff --git a/docs/pages_en/reference/cli/werf_kubectl_create_secret_docker_registry.md b/docs/pages_en/reference/cli/werf_kubectl_create_secret_docker_registry.md new file mode 100644 index 0000000000..6563bebfd8 --- /dev/null +++ b/docs/pages_en/reference/cli/werf_kubectl_create_secret_docker_registry.md @@ -0,0 +1,6 @@ +--- +title: werf kubectl create secret docker-registry +permalink: reference/cli/werf_kubectl_create_secret_docker_registry.html +--- + +{% include /reference/cli/werf_kubectl_create_secret_docker_registry.md %} diff --git a/docs/pages_en/reference/cli/werf_kubectl_create_secret_generic.md b/docs/pages_en/reference/cli/werf_kubectl_create_secret_generic.md new file mode 100644 index 0000000000..f4fe4a2851 --- /dev/null +++ b/docs/pages_en/reference/cli/werf_kubectl_create_secret_generic.md @@ -0,0 +1,6 @@ +--- +title: werf kubectl create secret generic +permalink: reference/cli/werf_kubectl_create_secret_generic.html +--- + +{% include /reference/cli/werf_kubectl_create_secret_generic.md %} diff --git a/docs/pages_en/reference/cli/werf_kubectl_create_secret_tls.md b/docs/pages_en/reference/cli/werf_kubectl_create_secret_tls.md new file mode 100644 index 0000000000..59ee931479 --- /dev/null +++ b/docs/pages_en/reference/cli/werf_kubectl_create_secret_tls.md @@ -0,0 +1,6 @@ +--- +title: werf kubectl create secret tls +permalink: reference/cli/werf_kubectl_create_secret_tls.html +--- + +{% include /reference/cli/werf_kubectl_create_secret_tls.md %} diff --git a/docs/pages_en/reference/cli/werf_kubectl_create_service.md b/docs/pages_en/reference/cli/werf_kubectl_create_service.md new file mode 100644 index 0000000000..c77b00c8f3 --- /dev/null +++ b/docs/pages_en/reference/cli/werf_kubectl_create_service.md @@ -0,0 +1,6 @@ +--- +title: werf kubectl create service +permalink: reference/cli/werf_kubectl_create_service.html +--- + +{% include /reference/cli/werf_kubectl_create_service.md %} diff --git a/docs/pages_en/reference/cli/werf_kubectl_create_service_clusterip.md b/docs/pages_en/reference/cli/werf_kubectl_create_service_clusterip.md new file mode 100644 index 0000000000..c95e5320d3 --- /dev/null +++ b/docs/pages_en/reference/cli/werf_kubectl_create_service_clusterip.md @@ -0,0 +1,6 @@ +--- +title: werf kubectl create service clusterip +permalink: reference/cli/werf_kubectl_create_service_clusterip.html +--- + +{% include /reference/cli/werf_kubectl_create_service_clusterip.md %} diff --git a/docs/pages_en/reference/cli/werf_kubectl_create_service_externalname.md b/docs/pages_en/reference/cli/werf_kubectl_create_service_externalname.md new file mode 100644 index 0000000000..0beb6fc68f --- /dev/null +++ b/docs/pages_en/reference/cli/werf_kubectl_create_service_externalname.md @@ -0,0 +1,6 @@ +--- +title: werf kubectl create service externalname +permalink: reference/cli/werf_kubectl_create_service_externalname.html +--- + +{% include /reference/cli/werf_kubectl_create_service_externalname.md %} diff --git a/docs/pages_en/reference/cli/werf_kubectl_create_service_loadbalancer.md b/docs/pages_en/reference/cli/werf_kubectl_create_service_loadbalancer.md new file mode 100644 index 0000000000..9693eeb93b --- /dev/null +++ b/docs/pages_en/reference/cli/werf_kubectl_create_service_loadbalancer.md @@ -0,0 +1,6 @@ +--- +title: werf kubectl create service loadbalancer +permalink: reference/cli/werf_kubectl_create_service_loadbalancer.html +--- + +{% include /reference/cli/werf_kubectl_create_service_loadbalancer.md %} diff --git a/docs/pages_en/reference/cli/werf_kubectl_create_service_nodeport.md b/docs/pages_en/reference/cli/werf_kubectl_create_service_nodeport.md new file mode 100644 index 0000000000..501ad47cfb --- /dev/null +++ b/docs/pages_en/reference/cli/werf_kubectl_create_service_nodeport.md @@ -0,0 +1,6 @@ +--- +title: werf kubectl create service nodeport +permalink: reference/cli/werf_kubectl_create_service_nodeport.html +--- + +{% include /reference/cli/werf_kubectl_create_service_nodeport.md %} diff --git a/docs/pages_en/reference/cli/werf_kubectl_create_serviceaccount.md b/docs/pages_en/reference/cli/werf_kubectl_create_serviceaccount.md new file mode 100644 index 0000000000..eab49b93d4 --- /dev/null +++ b/docs/pages_en/reference/cli/werf_kubectl_create_serviceaccount.md @@ -0,0 +1,6 @@ +--- +title: werf kubectl create serviceaccount +permalink: reference/cli/werf_kubectl_create_serviceaccount.html +--- + +{% include /reference/cli/werf_kubectl_create_serviceaccount.md %} diff --git a/docs/pages_en/reference/cli/werf_kubectl_debug.md b/docs/pages_en/reference/cli/werf_kubectl_debug.md new file mode 100644 index 0000000000..2cdf059b60 --- /dev/null +++ b/docs/pages_en/reference/cli/werf_kubectl_debug.md @@ -0,0 +1,6 @@ +--- +title: werf kubectl debug +permalink: reference/cli/werf_kubectl_debug.html +--- + +{% include /reference/cli/werf_kubectl_debug.md %} diff --git a/docs/pages_en/reference/cli/werf_kubectl_delete.md b/docs/pages_en/reference/cli/werf_kubectl_delete.md new file mode 100644 index 0000000000..fea67eafa6 --- /dev/null +++ b/docs/pages_en/reference/cli/werf_kubectl_delete.md @@ -0,0 +1,6 @@ +--- +title: werf kubectl delete +permalink: reference/cli/werf_kubectl_delete.html +--- + +{% include /reference/cli/werf_kubectl_delete.md %} diff --git a/docs/pages_en/reference/cli/werf_kubectl_describe.md b/docs/pages_en/reference/cli/werf_kubectl_describe.md new file mode 100644 index 0000000000..9c15ce5834 --- /dev/null +++ b/docs/pages_en/reference/cli/werf_kubectl_describe.md @@ -0,0 +1,6 @@ +--- +title: werf kubectl describe +permalink: reference/cli/werf_kubectl_describe.html +--- + +{% include /reference/cli/werf_kubectl_describe.md %} diff --git a/docs/pages_en/reference/cli/werf_kubectl_diff.md b/docs/pages_en/reference/cli/werf_kubectl_diff.md new file mode 100644 index 0000000000..2fe016b214 --- /dev/null +++ b/docs/pages_en/reference/cli/werf_kubectl_diff.md @@ -0,0 +1,6 @@ +--- +title: werf kubectl diff +permalink: reference/cli/werf_kubectl_diff.html +--- + +{% include /reference/cli/werf_kubectl_diff.md %} diff --git a/docs/pages_en/reference/cli/werf_kubectl_drain.md b/docs/pages_en/reference/cli/werf_kubectl_drain.md new file mode 100644 index 0000000000..336946bb66 --- /dev/null +++ b/docs/pages_en/reference/cli/werf_kubectl_drain.md @@ -0,0 +1,6 @@ +--- +title: werf kubectl drain +permalink: reference/cli/werf_kubectl_drain.html +--- + +{% include /reference/cli/werf_kubectl_drain.md %} diff --git a/docs/pages_en/reference/cli/werf_kubectl_edit.md b/docs/pages_en/reference/cli/werf_kubectl_edit.md new file mode 100644 index 0000000000..f774f9bb02 --- /dev/null +++ b/docs/pages_en/reference/cli/werf_kubectl_edit.md @@ -0,0 +1,6 @@ +--- +title: werf kubectl edit +permalink: reference/cli/werf_kubectl_edit.html +--- + +{% include /reference/cli/werf_kubectl_edit.md %} diff --git a/docs/pages_en/reference/cli/werf_kubectl_exec.md b/docs/pages_en/reference/cli/werf_kubectl_exec.md new file mode 100644 index 0000000000..a402359af4 --- /dev/null +++ b/docs/pages_en/reference/cli/werf_kubectl_exec.md @@ -0,0 +1,6 @@ +--- +title: werf kubectl exec +permalink: reference/cli/werf_kubectl_exec.html +--- + +{% include /reference/cli/werf_kubectl_exec.md %} diff --git a/docs/pages_en/reference/cli/werf_kubectl_explain.md b/docs/pages_en/reference/cli/werf_kubectl_explain.md new file mode 100644 index 0000000000..fac3a82969 --- /dev/null +++ b/docs/pages_en/reference/cli/werf_kubectl_explain.md @@ -0,0 +1,6 @@ +--- +title: werf kubectl explain +permalink: reference/cli/werf_kubectl_explain.html +--- + +{% include /reference/cli/werf_kubectl_explain.md %} diff --git a/docs/pages_en/reference/cli/werf_kubectl_expose.md b/docs/pages_en/reference/cli/werf_kubectl_expose.md new file mode 100644 index 0000000000..af2605aa2a --- /dev/null +++ b/docs/pages_en/reference/cli/werf_kubectl_expose.md @@ -0,0 +1,6 @@ +--- +title: werf kubectl expose +permalink: reference/cli/werf_kubectl_expose.html +--- + +{% include /reference/cli/werf_kubectl_expose.md %} diff --git a/docs/pages_en/reference/cli/werf_kubectl_get.md b/docs/pages_en/reference/cli/werf_kubectl_get.md new file mode 100644 index 0000000000..8bce6ab130 --- /dev/null +++ b/docs/pages_en/reference/cli/werf_kubectl_get.md @@ -0,0 +1,6 @@ +--- +title: werf kubectl get +permalink: reference/cli/werf_kubectl_get.html +--- + +{% include /reference/cli/werf_kubectl_get.md %} diff --git a/docs/pages_en/reference/cli/werf_kubectl_kustomize.md b/docs/pages_en/reference/cli/werf_kubectl_kustomize.md new file mode 100644 index 0000000000..199e64a9a7 --- /dev/null +++ b/docs/pages_en/reference/cli/werf_kubectl_kustomize.md @@ -0,0 +1,6 @@ +--- +title: werf kubectl kustomize +permalink: reference/cli/werf_kubectl_kustomize.html +--- + +{% include /reference/cli/werf_kubectl_kustomize.md %} diff --git a/docs/pages_en/reference/cli/werf_kubectl_label.md b/docs/pages_en/reference/cli/werf_kubectl_label.md new file mode 100644 index 0000000000..60d3ba6d9f --- /dev/null +++ b/docs/pages_en/reference/cli/werf_kubectl_label.md @@ -0,0 +1,6 @@ +--- +title: werf kubectl label +permalink: reference/cli/werf_kubectl_label.html +--- + +{% include /reference/cli/werf_kubectl_label.md %} diff --git a/docs/pages_en/reference/cli/werf_kubectl_logs.md b/docs/pages_en/reference/cli/werf_kubectl_logs.md new file mode 100644 index 0000000000..04c010c4e6 --- /dev/null +++ b/docs/pages_en/reference/cli/werf_kubectl_logs.md @@ -0,0 +1,6 @@ +--- +title: werf kubectl logs +permalink: reference/cli/werf_kubectl_logs.html +--- + +{% include /reference/cli/werf_kubectl_logs.md %} diff --git a/docs/pages_en/reference/cli/werf_kubectl_options.md b/docs/pages_en/reference/cli/werf_kubectl_options.md new file mode 100644 index 0000000000..2fc26b1993 --- /dev/null +++ b/docs/pages_en/reference/cli/werf_kubectl_options.md @@ -0,0 +1,6 @@ +--- +title: werf kubectl options +permalink: reference/cli/werf_kubectl_options.html +--- + +{% include /reference/cli/werf_kubectl_options.md %} diff --git a/docs/pages_en/reference/cli/werf_kubectl_patch.md b/docs/pages_en/reference/cli/werf_kubectl_patch.md new file mode 100644 index 0000000000..3dc2647c22 --- /dev/null +++ b/docs/pages_en/reference/cli/werf_kubectl_patch.md @@ -0,0 +1,6 @@ +--- +title: werf kubectl patch +permalink: reference/cli/werf_kubectl_patch.html +--- + +{% include /reference/cli/werf_kubectl_patch.md %} diff --git a/docs/pages_en/reference/cli/werf_kubectl_plugin.md b/docs/pages_en/reference/cli/werf_kubectl_plugin.md new file mode 100644 index 0000000000..5060b63bc0 --- /dev/null +++ b/docs/pages_en/reference/cli/werf_kubectl_plugin.md @@ -0,0 +1,6 @@ +--- +title: werf kubectl plugin +permalink: reference/cli/werf_kubectl_plugin.html +--- + +{% include /reference/cli/werf_kubectl_plugin.md %} diff --git a/docs/pages_en/reference/cli/werf_kubectl_plugin_list.md b/docs/pages_en/reference/cli/werf_kubectl_plugin_list.md new file mode 100644 index 0000000000..33bbca7cba --- /dev/null +++ b/docs/pages_en/reference/cli/werf_kubectl_plugin_list.md @@ -0,0 +1,6 @@ +--- +title: werf kubectl plugin list +permalink: reference/cli/werf_kubectl_plugin_list.html +--- + +{% include /reference/cli/werf_kubectl_plugin_list.md %} diff --git a/docs/pages_en/reference/cli/werf_kubectl_port_forward.md b/docs/pages_en/reference/cli/werf_kubectl_port_forward.md new file mode 100644 index 0000000000..5a8efb56c0 --- /dev/null +++ b/docs/pages_en/reference/cli/werf_kubectl_port_forward.md @@ -0,0 +1,6 @@ +--- +title: werf kubectl port-forward +permalink: reference/cli/werf_kubectl_port_forward.html +--- + +{% include /reference/cli/werf_kubectl_port_forward.md %} diff --git a/docs/pages_en/reference/cli/werf_kubectl_proxy.md b/docs/pages_en/reference/cli/werf_kubectl_proxy.md new file mode 100644 index 0000000000..200d3bfdd2 --- /dev/null +++ b/docs/pages_en/reference/cli/werf_kubectl_proxy.md @@ -0,0 +1,6 @@ +--- +title: werf kubectl proxy +permalink: reference/cli/werf_kubectl_proxy.html +--- + +{% include /reference/cli/werf_kubectl_proxy.md %} diff --git a/docs/pages_en/reference/cli/werf_kubectl_replace.md b/docs/pages_en/reference/cli/werf_kubectl_replace.md new file mode 100644 index 0000000000..7556458a7a --- /dev/null +++ b/docs/pages_en/reference/cli/werf_kubectl_replace.md @@ -0,0 +1,6 @@ +--- +title: werf kubectl replace +permalink: reference/cli/werf_kubectl_replace.html +--- + +{% include /reference/cli/werf_kubectl_replace.md %} diff --git a/docs/pages_en/reference/cli/werf_kubectl_rollout.md b/docs/pages_en/reference/cli/werf_kubectl_rollout.md new file mode 100644 index 0000000000..eefbfc9a31 --- /dev/null +++ b/docs/pages_en/reference/cli/werf_kubectl_rollout.md @@ -0,0 +1,6 @@ +--- +title: werf kubectl rollout +permalink: reference/cli/werf_kubectl_rollout.html +--- + +{% include /reference/cli/werf_kubectl_rollout.md %} diff --git a/docs/pages_en/reference/cli/werf_kubectl_rollout_history.md b/docs/pages_en/reference/cli/werf_kubectl_rollout_history.md new file mode 100644 index 0000000000..35ffe037cc --- /dev/null +++ b/docs/pages_en/reference/cli/werf_kubectl_rollout_history.md @@ -0,0 +1,6 @@ +--- +title: werf kubectl rollout history +permalink: reference/cli/werf_kubectl_rollout_history.html +--- + +{% include /reference/cli/werf_kubectl_rollout_history.md %} diff --git a/docs/pages_en/reference/cli/werf_kubectl_rollout_pause.md b/docs/pages_en/reference/cli/werf_kubectl_rollout_pause.md new file mode 100644 index 0000000000..5e719f1313 --- /dev/null +++ b/docs/pages_en/reference/cli/werf_kubectl_rollout_pause.md @@ -0,0 +1,6 @@ +--- +title: werf kubectl rollout pause +permalink: reference/cli/werf_kubectl_rollout_pause.html +--- + +{% include /reference/cli/werf_kubectl_rollout_pause.md %} diff --git a/docs/pages_en/reference/cli/werf_kubectl_rollout_restart.md b/docs/pages_en/reference/cli/werf_kubectl_rollout_restart.md new file mode 100644 index 0000000000..728fbfa816 --- /dev/null +++ b/docs/pages_en/reference/cli/werf_kubectl_rollout_restart.md @@ -0,0 +1,6 @@ +--- +title: werf kubectl rollout restart +permalink: reference/cli/werf_kubectl_rollout_restart.html +--- + +{% include /reference/cli/werf_kubectl_rollout_restart.md %} diff --git a/docs/pages_en/reference/cli/werf_kubectl_rollout_resume.md b/docs/pages_en/reference/cli/werf_kubectl_rollout_resume.md new file mode 100644 index 0000000000..e478541550 --- /dev/null +++ b/docs/pages_en/reference/cli/werf_kubectl_rollout_resume.md @@ -0,0 +1,6 @@ +--- +title: werf kubectl rollout resume +permalink: reference/cli/werf_kubectl_rollout_resume.html +--- + +{% include /reference/cli/werf_kubectl_rollout_resume.md %} diff --git a/docs/pages_en/reference/cli/werf_kubectl_rollout_status.md b/docs/pages_en/reference/cli/werf_kubectl_rollout_status.md new file mode 100644 index 0000000000..93924ea446 --- /dev/null +++ b/docs/pages_en/reference/cli/werf_kubectl_rollout_status.md @@ -0,0 +1,6 @@ +--- +title: werf kubectl rollout status +permalink: reference/cli/werf_kubectl_rollout_status.html +--- + +{% include /reference/cli/werf_kubectl_rollout_status.md %} diff --git a/docs/pages_en/reference/cli/werf_kubectl_rollout_undo.md b/docs/pages_en/reference/cli/werf_kubectl_rollout_undo.md new file mode 100644 index 0000000000..4c9b564314 --- /dev/null +++ b/docs/pages_en/reference/cli/werf_kubectl_rollout_undo.md @@ -0,0 +1,6 @@ +--- +title: werf kubectl rollout undo +permalink: reference/cli/werf_kubectl_rollout_undo.html +--- + +{% include /reference/cli/werf_kubectl_rollout_undo.md %} diff --git a/docs/pages_en/reference/cli/werf_kubectl_run.md b/docs/pages_en/reference/cli/werf_kubectl_run.md new file mode 100644 index 0000000000..3557c08efc --- /dev/null +++ b/docs/pages_en/reference/cli/werf_kubectl_run.md @@ -0,0 +1,6 @@ +--- +title: werf kubectl run +permalink: reference/cli/werf_kubectl_run.html +--- + +{% include /reference/cli/werf_kubectl_run.md %} diff --git a/docs/pages_en/reference/cli/werf_kubectl_scale.md b/docs/pages_en/reference/cli/werf_kubectl_scale.md new file mode 100644 index 0000000000..30de31066c --- /dev/null +++ b/docs/pages_en/reference/cli/werf_kubectl_scale.md @@ -0,0 +1,6 @@ +--- +title: werf kubectl scale +permalink: reference/cli/werf_kubectl_scale.html +--- + +{% include /reference/cli/werf_kubectl_scale.md %} diff --git a/docs/pages_en/reference/cli/werf_kubectl_set.md b/docs/pages_en/reference/cli/werf_kubectl_set.md new file mode 100644 index 0000000000..0897c294df --- /dev/null +++ b/docs/pages_en/reference/cli/werf_kubectl_set.md @@ -0,0 +1,6 @@ +--- +title: werf kubectl set +permalink: reference/cli/werf_kubectl_set.html +--- + +{% include /reference/cli/werf_kubectl_set.md %} diff --git a/docs/pages_en/reference/cli/werf_kubectl_set_env.md b/docs/pages_en/reference/cli/werf_kubectl_set_env.md new file mode 100644 index 0000000000..538944607e --- /dev/null +++ b/docs/pages_en/reference/cli/werf_kubectl_set_env.md @@ -0,0 +1,6 @@ +--- +title: werf kubectl set env +permalink: reference/cli/werf_kubectl_set_env.html +--- + +{% include /reference/cli/werf_kubectl_set_env.md %} diff --git a/docs/pages_en/reference/cli/werf_kubectl_set_image.md b/docs/pages_en/reference/cli/werf_kubectl_set_image.md new file mode 100644 index 0000000000..d434e79664 --- /dev/null +++ b/docs/pages_en/reference/cli/werf_kubectl_set_image.md @@ -0,0 +1,6 @@ +--- +title: werf kubectl set image +permalink: reference/cli/werf_kubectl_set_image.html +--- + +{% include /reference/cli/werf_kubectl_set_image.md %} diff --git a/docs/pages_en/reference/cli/werf_kubectl_set_resources.md b/docs/pages_en/reference/cli/werf_kubectl_set_resources.md new file mode 100644 index 0000000000..1b002e5c9d --- /dev/null +++ b/docs/pages_en/reference/cli/werf_kubectl_set_resources.md @@ -0,0 +1,6 @@ +--- +title: werf kubectl set resources +permalink: reference/cli/werf_kubectl_set_resources.html +--- + +{% include /reference/cli/werf_kubectl_set_resources.md %} diff --git a/docs/pages_en/reference/cli/werf_kubectl_set_selector.md b/docs/pages_en/reference/cli/werf_kubectl_set_selector.md new file mode 100644 index 0000000000..1b7e2a0633 --- /dev/null +++ b/docs/pages_en/reference/cli/werf_kubectl_set_selector.md @@ -0,0 +1,6 @@ +--- +title: werf kubectl set selector +permalink: reference/cli/werf_kubectl_set_selector.html +--- + +{% include /reference/cli/werf_kubectl_set_selector.md %} diff --git a/docs/pages_en/reference/cli/werf_kubectl_set_serviceaccount.md b/docs/pages_en/reference/cli/werf_kubectl_set_serviceaccount.md new file mode 100644 index 0000000000..2e9d9f23b8 --- /dev/null +++ b/docs/pages_en/reference/cli/werf_kubectl_set_serviceaccount.md @@ -0,0 +1,6 @@ +--- +title: werf kubectl set serviceaccount +permalink: reference/cli/werf_kubectl_set_serviceaccount.html +--- + +{% include /reference/cli/werf_kubectl_set_serviceaccount.md %} diff --git a/docs/pages_en/reference/cli/werf_kubectl_set_subject.md b/docs/pages_en/reference/cli/werf_kubectl_set_subject.md new file mode 100644 index 0000000000..28fd5e9c94 --- /dev/null +++ b/docs/pages_en/reference/cli/werf_kubectl_set_subject.md @@ -0,0 +1,6 @@ +--- +title: werf kubectl set subject +permalink: reference/cli/werf_kubectl_set_subject.html +--- + +{% include /reference/cli/werf_kubectl_set_subject.md %} diff --git a/docs/pages_en/reference/cli/werf_kubectl_taint.md b/docs/pages_en/reference/cli/werf_kubectl_taint.md new file mode 100644 index 0000000000..db108d1f74 --- /dev/null +++ b/docs/pages_en/reference/cli/werf_kubectl_taint.md @@ -0,0 +1,6 @@ +--- +title: werf kubectl taint +permalink: reference/cli/werf_kubectl_taint.html +--- + +{% include /reference/cli/werf_kubectl_taint.md %} diff --git a/docs/pages_en/reference/cli/werf_kubectl_top.md b/docs/pages_en/reference/cli/werf_kubectl_top.md new file mode 100644 index 0000000000..6e7fdc081c --- /dev/null +++ b/docs/pages_en/reference/cli/werf_kubectl_top.md @@ -0,0 +1,6 @@ +--- +title: werf kubectl top +permalink: reference/cli/werf_kubectl_top.html +--- + +{% include /reference/cli/werf_kubectl_top.md %} diff --git a/docs/pages_en/reference/cli/werf_kubectl_top_node.md b/docs/pages_en/reference/cli/werf_kubectl_top_node.md new file mode 100644 index 0000000000..3f885b053c --- /dev/null +++ b/docs/pages_en/reference/cli/werf_kubectl_top_node.md @@ -0,0 +1,6 @@ +--- +title: werf kubectl top node +permalink: reference/cli/werf_kubectl_top_node.html +--- + +{% include /reference/cli/werf_kubectl_top_node.md %} diff --git a/docs/pages_en/reference/cli/werf_kubectl_top_pod.md b/docs/pages_en/reference/cli/werf_kubectl_top_pod.md new file mode 100644 index 0000000000..1a0661d3a5 --- /dev/null +++ b/docs/pages_en/reference/cli/werf_kubectl_top_pod.md @@ -0,0 +1,6 @@ +--- +title: werf kubectl top pod +permalink: reference/cli/werf_kubectl_top_pod.html +--- + +{% include /reference/cli/werf_kubectl_top_pod.md %} diff --git a/docs/pages_en/reference/cli/werf_kubectl_uncordon.md b/docs/pages_en/reference/cli/werf_kubectl_uncordon.md new file mode 100644 index 0000000000..d2f09bd5d0 --- /dev/null +++ b/docs/pages_en/reference/cli/werf_kubectl_uncordon.md @@ -0,0 +1,6 @@ +--- +title: werf kubectl uncordon +permalink: reference/cli/werf_kubectl_uncordon.html +--- + +{% include /reference/cli/werf_kubectl_uncordon.md %} diff --git a/docs/pages_en/reference/cli/werf_kubectl_version.md b/docs/pages_en/reference/cli/werf_kubectl_version.md new file mode 100644 index 0000000000..45d605831f --- /dev/null +++ b/docs/pages_en/reference/cli/werf_kubectl_version.md @@ -0,0 +1,6 @@ +--- +title: werf kubectl version +permalink: reference/cli/werf_kubectl_version.html +--- + +{% include /reference/cli/werf_kubectl_version.md %} diff --git a/docs/pages_en/reference/cli/werf_kubectl_wait.md b/docs/pages_en/reference/cli/werf_kubectl_wait.md new file mode 100644 index 0000000000..692695c6f8 --- /dev/null +++ b/docs/pages_en/reference/cli/werf_kubectl_wait.md @@ -0,0 +1,6 @@ +--- +title: werf kubectl wait +permalink: reference/cli/werf_kubectl_wait.html +--- + +{% include /reference/cli/werf_kubectl_wait.md %}