2019-10-14 21:32:00 +02:00
|
|
|
#!/bin/bash
|
|
|
|
#$1=runtime
|
|
|
|
#$2=filename
|
|
|
|
#$3=function name
|
|
|
|
#$4=handler
|
|
|
|
|
2019-10-14 21:38:06 +02:00
|
|
|
#add --cpu 50m flag if you want to use autoscale
|
|
|
|
# --dependencies Gopkg.toml flag if necessary
|
2019-10-14 21:32:00 +02:00
|
|
|
kubeless function deploy $3 --runtime $1 --from-file $2 --handler $4
|
|
|
|
kubeless trigger http create $3 --function-name $3 --path $3 --hostname $3.kubeless
|
2019-10-14 21:38:06 +02:00
|
|
|
#kubeless autoscale create $3 --max 32 --metric "cpu" --min 1 --value "50"
|
2019-10-14 21:32:00 +02:00
|
|
|
|
|
|
|
#Test with curl --data '{"Another": "Echo"}' --header "Host: get-python.192.168.99.100.nip.io" --header "Content-Type:application/json" 192.168.99.100/echo
|