provider-http is a Crossplane Provider designed to facilitate sending HTTP requests as resources.
To install provider-http, you have two options:
console
crossplane xpkg install provider xpkg.upbound.io/crossplane-contrib/provider-http:v1.0.13
yaml
apiVersion: pkg.crossplane.io/v1
kind: Provider
metadata:
name: provider-http
spec:
package: 'xpkg.upbound.io/crossplane-contrib/provider-http:v1.0.13'
provider-http supports resources in two scopes:
http.crossplane.io)http.m.crossplane.io)When to use each:
The provider supports TLS certificate-based authentication for secure API communication:
# CA certificate
kubectl create secret generic ca-certs \
--from-file=ca.crt=./ca-cert.pem \
--namespace=crossplane-system
# Client certificate for mTLS
kubectl create secret tls client-certs \
--cert=./client.crt \
--key=./client.key \
--namespace=crossplane-system
apiVersion: http.crossplane.io/v1alpha1
kind: ProviderConfig
metadata:
name: secure-http
spec:
credentials:
source: None
tls:
caCertSecretRef:
name: ca-certs
namespace: crossplane-system
key: ca.crt
clientCertSecretRef:
name: client-certs
namespace: crossplane-system
key: tls.crt
clientKeySecretRef:
name: client-certs
namespace: crossplane-system
key: tls.key
apiVersion: http.crossplane.io/v1alpha2
kind: Request
metadata:
name: secure-api-call
spec:
providerConfigRef:
name: secure-http
forProvider:
url: https://api.example.com/resource
method: GET
See examples/provider/tls-config.yaml for more configuration options.
Create a DisposableRequest resource to initiate a single-use HTTP interaction:
apiVersion: http.crossplane.io/v1alpha2
kind: DisposableRequest
metadata:
name: example-disposable-request
spec:
# Add your DisposableRequest specification here
For more detailed examples and configuration options, refer to the examples directory.
Manage a resource through HTTP requests with a Request resource:
apiVersion: http.crossplane.io/v1alpha2
kind: Request
metadata:
name: example-request
spec:
# Add your Request specification here
For more detailed examples and configuration options, refer to the examples directory.
For namespace-scoped resources, use the http.m.crossplane.io API group:
apiVersion: http.m.crossplane.io/v1alpha2
kind: Request
metadata:
name: example-namespaced-request
namespace: my-namespace
spec:
# Add your Request specification here
providerConfigRef:
name: my-namespaced-config
For namespaced examples and configuration options, refer to the namespaced examples directory.
Run controller against the cluster:
make run
make test
make e2e
If you encounter any issues during installation or usage, refer to the troubleshooting guide for common problems and solutions.
$ claude mcp add provider-http \
-- python -m otcore.mcp_server <graph>