Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improvement code for Kubernetes #29

Open
ionutz89 opened this issue Jan 17, 2021 · 1 comment
Open

Improvement code for Kubernetes #29

ionutz89 opened this issue Jan 17, 2021 · 1 comment

Comments

@ionutz89
Copy link

Hello,

You should remove this line clusterIP: 10.43.37.100 from your ISP-Checker-deploy.yaml

Not everyone is using the same network address.

Also, you can add ingress and service for grafana like:

---
apiVersion: v1
kind: Service
metadata:
  labels:
    app: grafana
  name: grafana
  namespace: isp-checker
spec:
  type: ClusterIP
  ports:
    - name: grafana
      port: 3000
      protocol: TCP
      targetPort: 3000
  selector:
    app: grafana
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: grafana
  namespace: isp-checker
  annotations:
    kubernetes.io/ingress.class: "nginx"
spec:
  rules:
    - host: grafana.com
      http:
        paths:
          - backend:
              service:
                name: grafana
                port:
                  number: 3000
            path: /
            pathType: Prefix
  tls:
    - hosts:
      - grafana.com
      secretName: grafana-cert
@villasenor
Copy link

Agreed, not everyone has the same IP range in their cluster so that line for the influxdb-svc should be removed. Yes, and a LoadBalancer block should be added as well (can be commented out by default until you get Helm going):

apiVersion: v1
kind: Service
metadata:
  labels:
    app: grafana
    app.kubernetes.io/app: grafana
    app.kubernetes.io/project: isp-checker
  name: grafana-svc
  namespace: monitoring
spec:
  ports:
  - port: 3000
    protocol: TCP
    targetPort: 3000
  selector:
    app: grafana
  sessionAffinity: None
  type: LoadBalancer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants