mirror of
				https://github.com/fluxcd/flux2.git
				synced 2025-10-31 08:17:19 +08:00 
			
		
		
		
	
		
			
				
	
	
	
		
			2.9 KiB
		
	
	
	
	
	
	
	
			
		
		
	
	
			2.9 KiB
		
	
	
	
	
	
	
	
flux
Command line utility for assembling Kubernetes CD pipelines
Synopsis
Command line utility for assembling Kubernetes CD pipelines the GitOps way.
Examples
  # Check prerequisites
  flux check --pre
  # Install the latest version of the toolkit
  flux install --version=master
  # Create a source from a public Git repository
  flux create source git webapp-latest \
    --url=https://github.com/stefanprodan/podinfo \
    --branch=master \
    --interval=3m
  # List GitRepository sources and their status
  flux get sources git
  # Trigger a GitRepository source reconciliation
  flux reconcile source git flux-system
  # Export GitRepository sources in YAML format
  flux export source git --all > sources.yaml
  # Create a Kustomization for deploying a series of microservices
  flux create kustomization webapp-dev \
    --source=webapp-latest \
    --path="./deploy/webapp/" \
    --prune=true \
    --interval=5m \
    --validation=client \
    --health-check="Deployment/backend.webapp" \
    --health-check="Deployment/frontend.webapp" \
    --health-check-timeout=2m
  # Trigger a git sync of the Kustomization's source and apply changes
  flux reconcile kustomization webapp-dev --with-source
  # Suspend a Kustomization reconciliation
  flux suspend kustomization webapp-dev
  # Export Kustomizations in YAML format
  flux export kustomization --all > kustomizations.yaml
  # Resume a Kustomization reconciliation
  flux resume kustomization webapp-dev
  # Delete a Kustomization
  flux delete kustomization webapp-dev
  # Delete a GitRepository source
  flux delete source git webapp-latest
  # Uninstall the toolkit and delete CRDs
  flux uninstall --crds
Options
      --context string      kubernetes context to use
  -h, --help                help for flux
      --kubeconfig string   path to the kubeconfig file (default "~/.kube/config")
  -n, --namespace string    the namespace scope for this operation (default "flux-system")
      --timeout duration    timeout for this operation (default 5m0s)
      --verbose             print generated objects
SEE ALSO
- flux bootstrap - Bootstrap toolkit components
- flux check - Check requirements and installation
- flux completion - Generates completion scripts for various shells
- flux create - Create or update sources and resources
- flux delete - Delete sources and resources
- flux export - Export resources in YAML format
- flux get - Get sources and resources
- flux install - Install the toolkit components
- flux reconcile - Reconcile sources and resources
- flux resume - Resume suspended resources
- flux suspend - Suspend resources
- flux uninstall - Uninstall the toolkit components
