mirror of
				https://github.com/prometheus-operator/kube-prometheus.git
				synced 2025-11-04 01:51:01 +01:00 
			
		
		
		
	https://github.com/kubernetes/kubernetes/issues/29542 has been fixed, use apply instead of create to create third party resources in custom service monitoring example.
		
			
				
	
	
		
			16 lines
		
	
	
		
			645 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			16 lines
		
	
	
		
			645 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
#!/usr/bin/env bash
 | 
						|
 | 
						|
if [ -z "${KUBECONFIG}" ]; then
 | 
						|
    KUBECONFIG=~/.kube/config
 | 
						|
fi
 | 
						|
 | 
						|
if [ -z "${NAMESPACE}" ]; then
 | 
						|
    NAMESPACE=default
 | 
						|
fi
 | 
						|
 | 
						|
kubectl --namespace "$NAMESPACE" --kubeconfig="$KUBECONFIG" apply -f manifests/examples/example-app/prometheus-frontend-svc.yaml
 | 
						|
kubectl --namespace "$NAMESPACE" --kubeconfig="$KUBECONFIG" apply -f manifests/examples/example-app/example-app.yaml
 | 
						|
kubectl --namespace "$NAMESPACE" --kubeconfig="$KUBECONFIG" apply -f manifests/examples/example-app/prometheus-frontend.yaml
 | 
						|
kubectl --namespace "$NAMESPACE" --kubeconfig="$KUBECONFIG" apply -f manifests/examples/example-app/servicemonitor-frontend.yaml
 | 
						|
 |