Command Reference
This section provides a detailed guide on the various commands available in Flux v2, including their usage, options, and examples. For more information about Flux v2, please refer to the official documentation at Flux v2 Documentation.
What is Command Reference?
          Command Reference is a set of commands provided by Flux v2 to manage GitOps workflows. These commands enable users to interact with the Flux controller and perform various tasks such as syncing configurations, managing Kubernetes resources, and managing Git repositories.
Why is Command Reference important?
          Command Reference is important because it provides a powerful and flexible way to manage GitOps workflows using the command line. This can be particularly useful for automating tasks, integrating with other tools, and managing complex deployments.
Commands
flux
          The flux command is the main entry point for interacting with the Flux controller. It provides several subcommands for managing various aspects of the GitOps workflow.
flux status
          The status subcommand displays the current state of the Flux controller and the GitOps workflow. It provides information about the sync status of various resources, as well as any errors or warnings.
$ flux status
          
          flux sync
          The sync subcommand initiates a sync of the current branch in the configured Git repository with the Kubernetes cluster. This command is used to apply the latest changes to the cluster.
$ flux sync
          
          flux create-k8s
          The create-k8s subcommand creates a new Kubernetes resource file in the k8s directory of the Flux configuration. This can be used to create or update resources in the cluster using GitOps.
$ flux create-k8s my-deployment.yaml
          
          flux git
          The git command is used to manage Git repositories and branches used by Flux.
flux git checkout
          The checkout subcommand checks out a specific branch in the configured Git repository. This can be used to switch to a different branch for syncing.
$ flux git checkout my-branch
          
          flux git pull
          The pull subcommand pulls the latest changes from the configured Git repository. This can be used to update the local repository with the latest changes before syncing.
$ flux git pull
          
          flux helm
          The helm command is used to manage Helm charts used by Flux.
flux helm install
          The install subcommand installs a Helm chart from a specified repository and releases it in the Kubernetes cluster.
$ flux helm install my-chart my-release --repo https://my-chart-repo.com
          
          Conclusion
This Command Reference provides a comprehensive guide to the various commands available in Flux v2, along with their usage, options, and examples. For more information, please refer to the official Flux v2 documentation.