vmware-archive / kubeless-ui Goto Github PK
View Code? Open in Web Editor NEWGraphical User Interface for Kubeless
License: Apache License 2.0
Graphical User Interface for Kubeless
License: Apache License 2.0
Hi,
docker-compose is able to display the UI but there are some issues connecting the UI to the k8s cluster via the proxy.
Basically the issue is that the UI's docker envionment does not have access to proxy-url:proxy-port
dev_1 | webpack: Compiled successfully.
dev_1 | Mon, 05 Jun 2017 17:37:12 GMT app:server Error: request to http://localhost:8080/api/v1/pods failed, reason: connect ECONNREFUSED 127.0.0.1:8080
What would be the best way to achieve this? From the top of my head, we could tell the UI service to run in network mode host
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -13,3 +13,4 @@ services:
- .:/app
ports:
- "3000:3000"
+ network_mode: host
After creating an initial function, I clicked on the console button and I get:
I can retrieve those resources via kubectl
kubectl get po,svc,cm -l function=miguel
NAME READY STATUS RESTARTS AGE
po/miguel-4191672957-whsz5 1/1 Running 0 4m
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
svc/miguel ClusterIP 10.47.248.108 <none> 8080/TCP 4m
NAME DATA AGE
cm/miguel 3 4m
And the logs for the proxy container look like:
$ kubectl logs kubeless-ui-184132610-tv4rt -c proxy -n kubeapps -p
Error from server (BadRequest): previous terminated container "proxy" in pod "kubeless-ui-184132610-tv4rt" not found
Refreshing the UI after some time makes the UI console work.
Say some functions are packaged as "charts"
Retrieve this library of functions and display them in the UI, offering possibility to deploy.
I added some documentation associated with things like dev-guides and CONTRIBUTING.md. If it is useful I can submit a PR!
It should offer the rest of available runtimes
Hi,
I'm using minikube
and I've deployed kubeless-ui
via the k8s.yml
file.
I am getting the service url via minikube service -n kubeless ui --url
which gives me http://192.168.99.100:30113
.
I am using Chrome Version 69.0.3497.100 (Official Build) (64-bit) on Windows 7 x64.
The bug also occurs on Firefox 62.0.3 (64-bit) so I don't think it's a browser specific bug.
Something goes wrong in the editor react component and the editor does not have syntax highlighting.
The chain of events starts in src/components/Editor/Editor.js
at line 145
in render()
, where the mode
is computed for the AceEditor
3rd party component.
-> render() -> runtimeToMode() -> RuntimeHelper.runtimeToLanguage() ->
-> await this.getAllRuntimes() -> ... start returning
Somewhere along the way this fails because a Promise is not handled properly. Because of that the
browser issues a request to http://192.168.99.100:30113/mode-[object%20Promise].js
which
of course fails.
I think you need an async/await
pair either in runtimeToMode()
or render()
or both :).
In let mode = this.runtimeToMode()
, mode ends up to be a Promise object, not the resolved result.
I wanted to run the app locally but I'm on Windows and node-sass
does not support it.
got this bug with: kubectl create -f https://raw.githubusercontent.com/kubeless/kubeless-ui/master/k8s.yaml
it will result in creation of kubeless-ui but serviceaccount lack of visibility to see configmap.
Finish the dockerfile that packages the UI
I suggest you have a look to https://github.com/zeit/next.js/
IMO it is very easy to use and it is a good replacement for
https://github.com/davezuko/react-redux-starter-kit
and
https://github.com/facebookincubator/create-react-app
With the docker image in place, we can run the UI in a k8s deployment inside the cluster.
I made a PR to have such manifest, with a proxy running:
but it can't seem to be able to fetch the functions at all.
I am guessing an issue with the CORS proxy itself running in the UI code ?
For an unknown reason, when sending a POST
call to a function (/api/v1/proxy/namespaces/default/services/foo
), the function receive a GET
request
Here are some facts:
cors-proxy
used to fix cors in dev, but a curl request through the cors-proxy works fine.I'm thinking about a problem with headers on the kubernetes api server, if someone has any idea..?
GET functions work fine, but for POST functions, it does not seem that we can pass JSON objects.
When deploying kubeless-ui alongside other services, it would be really useful if I could put kubeless-ui somewhere other than /
on a dedicated hostname. Ideally kubeless-ui would use relative URLs for other kubeless-ui assets (stylesheets, javascript, etc), or failing that use a URL path prefix configurable via docker env/args.
Deployed a Kubeless + Kubeless UI on cloud using my_namespace as my namespace.
When using Kubeless UI, functions are been created in the default namespace and can't use pubsub because can't set ENVs vars for runtime containers.
Cannot propagate KUBELESS_KAFKA_SVC and KUBELESS_NAMESPACE to runtime envs via UI.
How to propagate the correct env vars for via ui for runtime function containers¿?
How to set Kubeless o functions aren't create in the default namespace¿?
PD: thanks to @andresmgot for support on bitnami slack channel.
got this bug when try to change existing code on kubeless-ui.
For example:
Although I can see function got changed if I do "kubectl get function -o yaml", the result has no changes at all.
the result only changes when I manually delete function pod, which will trigger a recreation of that pod. I think this is due to recreation of a function pod reloads function scripts.
suggestions: automatically kill old pod if user changes and saves a script on kubeless-ui
that's the correct way to apply a ASF license. Putting the license file int the root is not enough.
@jbianquetti-nami the UI runs on port 3000 but there is a CORS proxy running on port 3001.
I am wondering if in the Docker image, the CORS proxy process actually starts properly, preventing the UI to load functions when running inside a cluster. #17
Line 100 of k8s.yaml
has a duplicate key for imagePullPolicy
.
I'm wondering if it could be a good idea to allow the installation of kubeless/kubeless-controller directly from the UI
Just opening the discussion, to see what it involves 🙌
create function on UI with deps has no effect. function's dep field shows empty.
I can modify function to add dep(kubectl apply -f ) after creation though, and then deps shows on UI.
using the monocular backend we can add a chart repo view in the UI.
This would be nice, because functions are here to link other applications. Applications will be deployed as Charts. With a chart repo view and deployment capability, a user will have a single UI to deploy the charts and then deploy functions.
The exact command to reproduce the issue:
kubectl create -f https://raw.githubusercontent.com/kubeless/kubeless-ui/master/k8s.yaml
Error
unable to recognize "https://raw.githubusercontent.com/kubeless/kubeless-ui/master/k8s.yaml": no matches for kind "Deployment" in version "extensions/v1beta1"
kubectl version
Client Version: version.Info{Major:"1", Minor:"16", GitVersion:"v1.16.2", GitCommit:"c97fe5036ef3df2967d086711e6c0c405941e14b", GitTreeState:"clean", BuildDate:"2019-10-15T23:42:50Z", GoVersion:"go1.12.10", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"16", GitVersion:"v1.16.2", GitCommit:"c97fe5036ef3df2967d086711e6c0c405941e14b", GitTreeState:"clean", BuildDate:"2019-10-15T19:09:08Z", GoVersion:"go1.12.10", Compiler:"gc", Platform:"linux/amd64"}
Reason
Using deprecated Kubernetes API Endpoints.
We need to think about authentication for this.
The k8s dashboard might give us some ideas.
The coreOS dex project might be useful as well.
kubeless-ui
will run on localhost:3000. I'd like to access it through server IP like 217.20.113.125:3000 .
Is there any way?
thanks
Because the container reference does not get updated, hence the logs cannot be retrieved from the new containers corresponding to the function update.
Migrated from vmware-archive/kubeless#229.
Feature: Have a option to load python dependencies from Kubeless UI
kubeless
, this will be a call to a custom k8s endpoint.Start from code being stored in configmaps:
kubectl create configmaps foobar --from-file=foobar.py
with the readiness probe currently probing every 5 seconds, the logs are loonnng....
we should default to the last 100 long entries (at least for now in dev)....
Or maybe have an option:
A configmap might have multiple files in it.
kubectl create configmap barfoo --from-file=foo.py --from-file=requirements.txt
tree
structureHi, I have deployed kubeless v0.6.0 and kubeless-ui on kubernetes 1.10. I created test.foobar function using quick-start. I can call the function from kubeless as mentioned in guide:
$ kubeless function call get-python --data '{"echo": "echo echo"}'
{"echo": "echo echo"}
However, when I try to run function using ui, I get nothing back. In browser console, I see response to POST http://<ui-pod-ip>:3000/proxy
is 500 and request payload has following:
{url: "http://localhost:8080/api/v1/proxy/namespaces/kubeless/services/get-python:8080",…}
headers:{event-id: "ui-11ebb8bc32f0", event-time: "2018-04-24T14:42:21.809Z", event-type: "application/json",…}
Accept:"application/json"
Content-Type:"application/json"
X-Requested-With:"XMLHttpRequest"
event-id:"ui-11ebb8bc32f0"
event-namespace:"ui.kubeless.io"
event-time:"2018-04-24T14:42:21.809Z"
event-type:"application/json"
json:"{"hi":"d"}"
method:"post"
url:"http://localhost:8080/api/v1/proxy/namespaces/kubeless/services/get-python:8080"
I ran kubectl proxy -p 8080
locally and tried following:
$ curl http://localhost:8080/api/v1/proxy/namespaces/kubeless/services/get-python
{
"kind": "Status",
"apiVersion": "v1",
"metadata": { },
"status": "Failure",
"message": "the server could not find the requested resource",
"reason": "NotFound",
"details": { },
"code": 404
}
is this url correct? As per kubernetes doc, shouldn't this be localhost:8080/api/v1/namespaces/kubeless/services/get-python:8080/proxy
?
sudo minikube start --image-mirror-country cn --iso-url=https://kubernetes.oss-cn-hangzhou.aliyuncs.com/minikube/iso/minikube-v1.9.0.iso --registry-mirror=https://mirror.aliyuncs.com --vm-driver=none --insecure-registry=[192.168.31.211:5000]
sudo kubectl proxy --port=8001 --accept-hosts='^.*' --address='192.168.31.211'
docker version
# docker version
Client: Docker Engine - Community
Version: 19.03.12
API version: 1.40
Go version: go1.13.10
Git commit: 48a66213fe
Built: Mon Jun 22 15:45:49 2020
OS/Arch: linux/amd64
Experimental: false
Server: Docker Engine - Community
Engine:
Version: 19.03.12
API version: 1.40 (minimum version 1.12)
Go version: go1.13.10
Git commit: 48a66213fe
Built: Mon Jun 22 15:44:20 2020
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.2.13
GitCommit: 7ad184331fa3e55e52b890ea95e65ba581ae3429
runc:
Version: 1.0.0-rc10
GitCommit: dc9208a3303feef5b3839f4323d9beb36df0a9dd
docker-init:
Version: 0.18.0
GitCommit: fec3683
kubeless version
# kubeless version
Kubeless version: v1.0.7-dirty
create,call function success by cli
# kubeless function call hello --data 'Hello world!'
Hello world!
but create function in UI failed
and server error info
# yarn run dev
yarn run v1.22.4
$ better-npm-run dev
running better-npm-run in /k8s/kubeless/kubeless-ui
Executing script: dev
to be executed: nodemon bin/server --ignore dist --ignore coverage --ignore tests --ignore src
[nodemon] 1.11.0
[nodemon] to restart at any time, enter `rs`
[nodemon] watching: *.*
[nodemon] starting `node bin/server index.js`
app:config:project Creating default configuration. +0ms
app:config:project Looking for environment overrides for NODE_ENV "development". +3ms
app:config:project Found overrides, applying to default configuration. +1ms
app:config:webpack Creating configuration. +808ms
app:config:webpack Enabling plugins for live development (HMR, NoEmitOnErrors). +2ms
app:server Enabling webpack dev and HMR middleware +134ms
app:bin:server
app:bin:server
app:bin:server 💻 Server is now running at localhost:3000 +43ms
(node:4443) DeprecationWarning: loaderUtils.parseQuery() received a non-string value which can be problematic, see https://github.com/webpack/loader-utils/issues/56
parseQuery() will be replaced with getOptions() in the next major version of loader-utils.
at Object.parseQuery (/k8s/kubeless/kubeless-ui/node_modules/babel-loader/node_modules/loader-utils/index.js:78:3)
at Object.module.exports (/k8s/kubeless/kubeless-ui/node_modules/babel-loader/lib/index.js:104:35)
at LOADER_EXECUTION (/k8s/kubeless/kubeless-ui/node_modules/loader-runner/lib/LoaderRunner.js:119:14)
at runSyncOrAsync (/k8s/kubeless/kubeless-ui/node_modules/loader-runner/lib/LoaderRunner.js:120:4)
at iterateNormalLoaders (/k8s/kubeless/kubeless-ui/node_modules/loader-runner/lib/LoaderRunner.js:229:2)
at Array.<anonymous> (/k8s/kubeless/kubeless-ui/node_modules/loader-runner/lib/LoaderRunner.js:202:4)
at Storage.finished (/k8s/kubeless/kubeless-ui/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:38:15)
at /k8s/kubeless/kubeless-ui/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:69:9
at /k8s/kubeless/kubeless-ui/node_modules/graceful-fs/graceful-fs.js:115:16
at FSReqWrap.readFileAfterClose [as oncomplete] (internal/fs/read_file_context.js:53:3)
webpack built b401a52cb111a9aeacc2 in 9882ms
Hash: b401a52cb111a9aeacc2
Version: webpack 2.4.1
Time: 9882ms
Asset Size Chunks Chunk Names
/k8s/kubeless/kubeless-ui/node_modules/font-awesome/fonts/fontawesome-webfont.eot 166 kB [emitted]
ba89e316e1e812fc4e91923f94d76895.png 24.5 kB [emitted]
app.b401a52cb111a9aeacc2.js 4.73 MB 0 [emitted] [big] app
vendor.b401a52cb111a9aeacc2.js 445 kB 1 [emitted] [big] vendor
app.b401a52cb111a9aeacc2.js.map 5.53 MB 0 [emitted] app
vendor.b401a52cb111a9aeacc2.js.map 493 kB 1 [emitted] vendor
favicon.ico 34.5 kB [emitted]
index.html 977 bytes [emitted]
Child html-webpack-plugin for "index.html":
Asset Size Chunks Chunk Names
index.html 571 kB 0
webpack: Compiled successfully.
app:server Error: request to http://localhost:8080/api/v1/namespaces/kubeless/configmaps/kubeless-config failed, reason: connect ECONNREFUSED 127.0.0.1:8080 +17s
app:server Error: request to http://localhost:8080/api/v1/pods failed, reason: connect ECONNREFUSED 127.0.0.1:8080 +28ms
app:server Error: request to http://localhost:8080/apis/kubeless.io/v1beta1/functions failed, reason: connect ECONNREFUSED 127.0.0.1:8080 +1ms
app:server Error: request to http://localhost:8080/api/v1/namespaces/kubeless/configmaps/kubeless-config failed, reason: connect ECONNREFUSED 127.0.0.1:8080 +57ms
app:server Error: request to http://localhost:8080/api/v1/namespaces/kubeless/configmaps/kubeless-config failed, reason: connect ECONNREFUSED 127.0.0.1:8080 +2s
app:server Error: request to http://localhost:8080/api/v1/namespaces/kubeless/configmaps/kubeless-config failed, reason: connect ECONNREFUSED 127.0.0.1:8080 +1ms
app:server Error: request to http://localhost:8080/api/v1/namespaces/kubeless/configmaps/kubeless-config failed, reason: connect ECONNREFUSED 127.0.0.1:8080 +18s
app:server Error: request to http://localhost:8080/api/v1/namespaces/kubeless/configmaps/kubeless-config failed, reason: connect ECONNREFUSED 127.0.0.1:8080 +3ms
app:server Error: request to http://localhost:8080/api/v1/namespaces/kubeless/configmaps/kubeless-config failed, reason: connect ECONNREFUSED 127.0.0.1:8080 +21m
app:server Error: request to http://localhost:8080/api/v1/pods failed, reason: connect ECONNREFUSED 127.0.0.1:8080 +13ms
app:server Error: request to http://localhost:8080/apis/kubeless.io/v1beta1/functions failed, reason: connect ECONNREFUSED 127.0.0.1:8080 +1ms
app:server Error: request to http://localhost:8080/api/v1/namespaces/kubeless/configmaps/kubeless-config failed, reason: connect ECONNREFUSED 127.0.0.1:8080 +81ms
app:server Error: request to http://localhost:8080/api/v1/namespaces/kubeless/configmaps/kubeless-config failed, reason: connect ECONNREFUSED 127.0.0.1:8080 +25m
app:server Error: request to http://localhost:8080/api/v1/namespaces/kubeless/configmaps/kubeless-config failed, reason: connect ECONNREFUSED 127.0.0.1:8080 +16ms
all pod are running
# kubectl get pod --all-namespaces
NAMESPACE NAME READY STATUS RESTARTS AGE
default hello-f765f6fbd-p4r4c 1/1 Running 0 5h16m
kube-system coredns-546565776c-28cw2 1/1 Running 0 5h25m
kube-system coredns-546565776c-xd825 1/1 Running 0 5h25m
kube-system etcd-pc09 1/1 Running 0 5h25m
kube-system kube-apiserver-pc09 1/1 Running 0 5h25m
kube-system kube-controller-manager-pc09 1/1 Running 0 5h25m
kube-system kube-proxy-48mml 1/1 Running 0 5h25m
kube-system kube-scheduler-pc09 1/1 Running 0 5h25m
kube-system storage-provisioner 1/1 Running 0 5h25m
kubeless kubeless-controller-manager-59d484f4d-9zpjg 3/3 Running 0 5h19m
kubeless ui-698c9989-4bhcx 2/2 Running 0 66m
kubernetes-dashboard dashboard-metrics-scraper-84bfdf55ff-rlrrv 1/1 Running 0 5h25m
kubernetes-dashboard kubernetes-dashboard-bc446cc64-hls4t 1/1 Running 0 5h25m
and i cannot curl 8080 on server
# curl 127.0.0.1:8080
curl: (7) Failed to connect to 127.0.0.1 port 8080: 拒绝连接
# kubectl logs ui-698c9989-4bhcx -n kubeless -c proxy
Starting to serve on 127.0.0.1:8080
help!!!!
Some functions may not be running (just code that is retrieved from configmaps not linked to kubeless).
For functions that are running via kubeless, we need a view that does:
kubectl get logs
Not able to Scroll down the UI page. Cursor going down but not able to view page.
We are testing Kubeless (with Kubeless-UI) and are experiencing issues with the css in our offline on-prem infra.
This seems to be the root of the issue: https://github.com/kubeless/kubeless-ui/blob/d133b26cfa0f7a4d110f40323c88b33435884d01/src/styles/core.scss#L20-L22
functions deployed in namespaces other then "default" are not shown.
also if the config: functions-namespace, is used, kubeless-ui does not show anything at all
I am running the kubeless UI and it comes up just fine. However, I am unable to create any new functions or see existing functions through the UI. I am running behind a proxy so I am wondering if that has anything to do with it. My minikube cluster IP is 192.168.99.100. The cluster IP on the Kubeless UI is like so
I try to create the function and while the function modal pops up it doesnt actually create anything.
When I look at the ui pod logs I see this
yarn run v0.24.4
$ better-npm-run start
running better-npm-run in /app
Executing script: start
to be executed: node bin/server
Thu, 12 Oct 2017 14:59:59 GMT app:config:project Creating default configuration.
Thu, 12 Oct 2017 14:59:59 GMT app:config:project Looking for environment overrides for NODE_ENV "production".
Thu, 12 Oct 2017 14:59:59 GMT app:config:project Found overrides, applying to default configuration.
Thu, 12 Oct 2017 15:00:01 GMT app:config:webpack Creating configuration.
Thu, 12 Oct 2017 15:00:01 GMT app:config:webpack Enabling plugins for production (OccurenceOrder, Dedupe & UglifyJS).
Thu, 12 Oct 2017 15:00:01 GMT app:config:webpack Applying ExtractTextPlugin to CSS loaders.
Thu, 12 Oct 2017 15:00:01 GMT app:bin:server
💻 Server is now running on port 3000
Thu, 12 Oct 2017 15:00:28 GMT app:server Error: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"the API version in the data () does not match the expected API version (k8s.io/v1)","reason":"BadRequest","code":400}
Thu, 12 Oct 2017 15:01:03 GMT app:server Error: request to http://192.168.99.100:8080/api/v1/pods failed, reason: connect ECONNREFUSED 192.168.99.100:8080
Thu, 12 Oct 2017 15:01:03 GMT app:server Error: request to http://192.168.99.100:8080/apis/k8s.io/v1/functions failed, reason: connect ECONNREFUSED 192.168.99.100:8080
Thu, 12 Oct 2017 15:01:09 GMT app:server Error: request to http://192.168.99.100:8080/apis/k8s.io/v1/namespaces/default/functions failed, reason: connect ECONNREFUSED 192.168.99.100:8080
Thu, 12 Oct 2017 15:02:27 GMT app:server Error: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"the API version in the data () does not match the expected API version (k8s.io/v1)","reason":"BadRequest","code":400}
Thu, 12 Oct 2017 15:10:45 GMT app:server Error: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"the API version in the data () does not match the expected API version (k8s.io/v1)","reason":"BadRequest","code":400}
Thu, 12 Oct 2017 15:14:46 GMT app:server Error: {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"the API version in the data () does not match the expected API version (k8s.io/v1)","reason":"BadRequest","code":400}
There seem to be 2 errors here
What do you think is the problem here?
Hi,
It seems that now it is possible to have a development environment by using the existing docker-compose file. It would probably make sense to mention it in the README.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.