mirror of
				https://github.com/prometheus-operator/kube-prometheus.git
				synced 2025-10-31 16:11:01 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			22 lines
		
	
	
		
			496 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			22 lines
		
	
	
		
			496 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
| #!/usr/bin/env bash
 | |
| 
 | |
| if [ -z "${KUBECONFIG}" ]; then
 | |
|     KUBECONFIG=~/.kube/config
 | |
| fi
 | |
| 
 | |
| kubectl --kubeconfig="$KUBECONFIG" create namespace monitoring
 | |
| 
 | |
| kctl() {
 | |
|     kubectl --kubeconfig="$KUBECONFIG" -n "monitoring" "$@"
 | |
| }
 | |
| 
 | |
| kctl apply -f manifests/prometheus-operator.yaml
 | |
| 
 | |
| # Wait for TPRs to be ready.
 | |
| until kctl get servicemonitor; do sleep 1; done
 | |
| until kctl get prometheus; do sleep 1; done
 | |
| 
 | |
| kctl apply -f manifests/exporters
 | |
| kctl apply -f manifests/grafana
 | |
| kctl apply -f manifests/prometheus
 |