Open haewons-tanzu opened 6 years ago
+1
@hshin-pivotal do you install it on a CFCR ? if yes I can show you how deploy it with a bosh release I've done to deploy helm chart
@oberyler i installed on pks, pivotal container service. But it's based on CFCR, so it'll be helpful if you can help me. :) Thx
This is the bosh release I've done to deploy helm chart /repository or also apply Kubectl apply https://github.com/orange-cloudfoundry/helm-kubectl-boshrelease
here is the monocular operator to deploy it (may you have to change the storage class) the monocular-version should be set 0.6.3 as 0.6.4 have bloked issue with mongodb see other post on these suject
- type: replace
path: /instance_groups/name=cfcr-addon/jobs/name=helm/properties/repositories/-
value:
name: monocular
url: https://helm.github.io/monocular
- type: replace
path: /instance_groups/name=cfcr-addon/jobs/name=helm/properties/ingress/-
value:
name: monocular-ingress
namespace: monocular
annotations:
- name: nginx.ingress.kubernetes.io/rewrite-target
value: '/'
definition:
spec:
rules:
- host: monocular.((cloudfoundry_ops_domain))
http:
paths:
- backend:
serviceName: monocular-monocular-ui
servicePort: 80
path: /
- backend:
serviceName: monocular-monocular-api
servicePort: 80
path: /api/
- type: replace
path: /instance_groups/name=cfcr-addon/jobs/name=helm/properties/charts/-
value:
name: monocular
chart: monocular/monocular
namespace: monocular
version: ((monocular-version))
values:
global:
persistence:
storageClass: tf-cinder-storage-class
ingress:
enabled: false
api:
livenessProbe:
initialDelaySeconds: 1800
resources:
limits:
memory: 526Mi
cpu: 200m
config:
repos:
- name: stable
url: http://storage.googleapis.com/kubernetes-charts
source: https://github.com/kubernetes/charts/tree/master/stable
- name: incubator
url: https://kubernetes-charts-incubator.storage.googleapis.com
source: https://github.com/kubernetes/charts/tree/master/incubator
- name: monocular
url: https://helm.github.io/monocular
source: https://github.com/helm/monocular/tree/master/charts
- name: internal
url: https://ingress-ops.((cloudfoundry_ops_domain))/chartmuseum
and here is the manifest:
---
#Deployment Identification
name: cfcr-addon
#Features Block
#Releases Block
releases:
- name: helm-kubectl
version: latest
- name: shell
version: latest
#Stemcells Block
stemcells:
- alias: trusty
os: ubuntu-trusty
version: latest
#Update Block
update:
canaries: 1
max_in_flight: 2
canary_watch_time: 15000-30000
update_watch_time: 15000-300000
#Instance Groups Block
instance_groups:
- name: cfcr-empty
vm_type: small
stemcell: trusty
networks:
- name: tf-net-kubo
azs: [z1,z2,z3]
instances: 1
jobs:
- name: shell
release: shell
- name: cfcr-addon
vm_type: small
stemcell: trusty
persistent_disk_type: default
networks:
- name: tf-net-kubo
azs: [z1,z2,z3]
lifecycle: errand
instances: 1
jobs:
- name: helm
release: helm-kubectl
properties:
kubernetes:
host: ((kubernetes.host))
port: ((kubernetes.port))
cluster_ca_certificate: ((kubernetes.cluster_ca_certificate))
password: ((kubernetes-password))
default_storageclass: tf-cinder-storage-class
repositories:
- name: stable
url: https://kubernetes-charts.storage.googleapis.com/
- name: incubator
url : https://kubernetes-charts-incubator.storage.googleapis.com/
charts:
- name: nginx-ingress
chart: stable/nginx-ingress
version: 0.23.1
properties:
- name: rbac.create
value: true
- name: controller.service.type
value: NodePort
- name: controller.service.nodePorts.https
value: 30725
- name: controller.service.nodePorts.http
value: 30726
- name: revisionHistoryLimit
value: 5
- name: controller.extraArgs.enable-ssl-passthrough
value: ""
ingress: []
and if you want to access to your kube dashboard you can use this operator :
- type: replace
path: /instance_groups/name=cfcr-addon/jobs/name=helm/properties/ingress/-
value:
name: dashboard-ingress
namespace: kube-system
annotations:
- name: nginx.ingress.kubernetes.io/rewrite-target
value: '/'
- name: nginx.ingress.kubernetes.io/secure-backends
value: '"true"'
definition:
spec:
tls:
- hosts:
- ingress-ops.((cloudfoundry_ops_domain))
secretName: kubernetes-dashboard-certs
rules:
- host: ingress-ops.((cloudfoundry_ops_domain))
http:
paths:
- backend:
serviceName: kubernetes-dashboard
servicePort: 443
path: /dashboard
Hm, I am hitting the same error, even though I am using Minikube or Kubeadm. Any suggestions?
How do you install monocular Is it with helm chart ? If yes take the version 0.6.3 instead of 0.6.4. The 0.6.4 has trouble with mongodb.
Yes, it is deployed with helm chart and I did try both 0.6.4 and 0.6.3, but I get the same error.
I thought that the issue is related with web/api calls so I tried setting the endpoints respectively, but both of the components are in the same namespace.
Also, I didn't encounter any mongodb issue going through the logs. Am I missing something?
I noticed the same issue with an error on every page from :
polyfills.86723bf50f771fb0d1a9.bundle.js:1 GET http://monocular-api.test.local/auth/verify 404
@cello86 that error is expected if authentication is disabled
@prydonius I noticed also this error reported:
vendor.be7b2a3ce592e457b68c.bundle.js:1 ERROR Error: Cannot find a differ supporting object '[object Object]' of type 'object'. NgFor only supports binding to Iterables such as Arrays.
at t.ngOnChanges (vendor.be7b2a3ce592e457b68c.bundle.js:1)
at xn (vendor.be7b2a3ce592e457b68c.bundle.js:1)
at pr (vendor.be7b2a3ce592e457b68c.bundle.js:1)
at ur (vendor.be7b2a3ce592e457b68c.bundle.js:1)
at Lr (vendor.be7b2a3ce592e457b68c.bundle.js:1)
at Object.updateDirectives (main.93410e3c42ae293f6e6c.bundle.js:1)
at Object.updateDirectives (vendor.be7b2a3ce592e457b68c.bundle.js:1)
at cr (vendor.be7b2a3ce592e457b68c.bundle.js:1)
at wr (vendor.be7b2a3ce592e457b68c.bundle.js:1)
at vr (vendor.be7b2a3ce592e457b68c.bundle.js:1)
I met the same problem, and I also find that outside the cluster run curl $(addressIP)/vendor.be7b2a3ce592e457b68c.bundle.js
get the same response with curl $(addressIP)
, and when I run kubectl run curl --image=radial/busyboxplus:curl -it
and curl $(ClusterIP)/vendor.be7b2a3ce592e457b68c.bundle.js
can get the right response of the js file.
then I run kubectl logs -f dozing-catfish-nginx-ingress-controller-55b5ffdff4-lwvsp
to see logs and find that the path(/?(.)/(.)) and rewrite-target may don't match.
see in kubectl get ingress -o yaml
apiVersion: v1
items:
- apiVersion: extensions/v1beta1
kind: Ingress
metadata:
annotations:
kubernetes.io/ingress.class: nginx
nginx.ingress.kubernetes.io/rewrite-target: /$1
nginx.ingress.kubernetes.io/ssl-redirect: "false"
creationTimestamp: "2019-05-07T07:47:07Z"
generation: 7
labels:
app: peeking-buffoon-monocular
chart: monocular-1.4.5
heritage: Tiller
release: peeking-buffoon
name: peeking-buffoon-monocular
namespace: default
resourceVersion: "77608"
selfLink: /apis/extensions/v1beta1/namespaces/default/ingresses/peeking-buffoon-monocular
uid: 50860bad-709c-11e9-b85d-0050569e1560
spec:
rules:
- http:
paths:
- backend:
serviceName: peeking-buffoon-monocular-ui
servicePort: 80
path: /?(.*)
- backend:
serviceName: peeking-buffoon-monocular-chartsvc
servicePort: 8080
path: /api/chartsvc/?(.*)
status:
loadBalancer:
ingress:
- {}
kind: List
metadata:
resourceVersion: ""
selfLink: ""
so I edit the ingress as below: (remove ?(.*)
in path and $1
in rewrite-target)
apiVersion: v1
items:
- apiVersion: extensions/v1beta1
kind: Ingress
metadata:
annotations:
kubernetes.io/ingress.class: nginx
nginx.ingress.kubernetes.io/rewrite-target: /
nginx.ingress.kubernetes.io/ssl-redirect: "false"
creationTimestamp: "2019-05-07T07:47:07Z"
generation: 7
labels:
app: peeking-buffoon-monocular
chart: monocular-1.4.5
heritage: Tiller
release: peeking-buffoon
name: peeking-buffoon-monocular
namespace: default
resourceVersion: "77608"
selfLink: /apis/extensions/v1beta1/namespaces/default/ingresses/peeking-buffoon-monocular
uid: 50860bad-709c-11e9-b85d-0050569e1560
spec:
rules:
- http:
paths:
- backend:
serviceName: peeking-buffoon-monocular-ui
servicePort: 80
path: /
- backend:
serviceName: peeking-buffoon-monocular-chartsvc
servicePort: 8080
path: /api/chartsvc
status:
loadBalancer:
ingress:
- {}
kind: List
metadata:
resourceVersion: ""
selfLink: ""
after that , I can see the pages without ERROR Unexpected token < in JSON at position 0" in the console.
@shanquan I think the issue is that you have an older version of the nginx ingress controller, 0.22.0+ requires capture groups to be defined. See https://kubernetes.github.io/ingress-nginx/examples/rewrite/#rewrite-target
I installed monocular v0.7.3, but it doesn't show chart after stucking in loading. Through chrome development tool, I could see "vendor.be7b2a3ce592e457b68c.bundle.js:1 ERROR Unexpected token < in JSON at position 0".
I'm connecting node ip and node port directly, not connecting ingress cluster ip. How can I solve it?