mirror of
https://github.com/amkartashov/gf-k8s.git
synced 2026-01-10 17:39:43 +00:00
expose kube API
This commit is contained in:
parent
84575b6129
commit
c510d6df53
4 changed files with 56 additions and 0 deletions
|
|
@ -30,6 +30,8 @@ Applications & Projects
|
||||||
+------------------------------+----------------------------------------------------------------+-------------------------+
|
+------------------------------+----------------------------------------------------------------+-------------------------+
|
||||||
| Ingress-Nginx_ | `Ingress Controller`_ | |ingress-nginx_status| |
|
| Ingress-Nginx_ | `Ingress Controller`_ | |ingress-nginx_status| |
|
||||||
+------------------------------+----------------------------------------------------------------+-------------------------+
|
+------------------------------+----------------------------------------------------------------+-------------------------+
|
||||||
|
| Kube-Api_ | Kube API exposed via ingress | |kube-api_status| |
|
||||||
|
+------------------------------+----------------------------------------------------------------+-------------------------+
|
||||||
| Kube-State-Metrics_ | `Kubernetes Metrics`_ | |ksm_status| |
|
| Kube-State-Metrics_ | `Kubernetes Metrics`_ | |ksm_status| |
|
||||||
+------------------------------+----------------------------------------------------------------+-------------------------+
|
+------------------------------+----------------------------------------------------------------+-------------------------+
|
||||||
| Local-Path-Provisioner_ | `Rancher Local-Path`_ | |local-path_status| |
|
| Local-Path-Provisioner_ | `Rancher Local-Path`_ | |local-path_status| |
|
||||||
|
|
@ -78,6 +80,9 @@ Applications & Projects
|
||||||
.. _Kubernetes Metrics: https://github.com/kubernetes/kube-state-metrics
|
.. _Kubernetes Metrics: https://github.com/kubernetes/kube-state-metrics
|
||||||
.. |ksm_status| image:: https://argocd.ioot.xyz/api/badge?name=kube-state-metrics&revision=true
|
.. |ksm_status| image:: https://argocd.ioot.xyz/api/badge?name=kube-state-metrics&revision=true
|
||||||
|
|
||||||
|
.. _Kube-Api: https://argocd.ioot.xyz/applications/argocd/kube-api
|
||||||
|
.. |kube-api_status| image:: https://argocd.ioot.xyz/api/badge?name=kube-api&revision=true
|
||||||
|
|
||||||
.. _Grafana-Operator: https://argocd.ioot.xyz/applications/argocd/grafana-operator
|
.. _Grafana-Operator: https://argocd.ioot.xyz/applications/argocd/grafana-operator
|
||||||
.. _Grafana Operator: https://github.com/grafana-operator/grafana-operator
|
.. _Grafana Operator: https://github.com/grafana-operator/grafana-operator
|
||||||
.. |grafana-op_status| image:: https://argocd.ioot.xyz/api/badge?name=grafana-operator&revision=true
|
.. |grafana-op_status| image:: https://argocd.ioot.xyz/api/badge?name=grafana-operator&revision=true
|
||||||
|
|
|
||||||
20
state/gullfaxi/system/kube-api/application.yaml
Normal file
20
state/gullfaxi/system/kube-api/application.yaml
Normal file
|
|
@ -0,0 +1,20 @@
|
||||||
|
apiVersion: argoproj.io/v1alpha1
|
||||||
|
kind: Application
|
||||||
|
metadata:
|
||||||
|
name: kube-api
|
||||||
|
spec:
|
||||||
|
destination:
|
||||||
|
server: https://kubernetes.default.svc
|
||||||
|
namespace: default
|
||||||
|
project: system
|
||||||
|
syncPolicy:
|
||||||
|
automated:
|
||||||
|
prune: true
|
||||||
|
selfHeal: true
|
||||||
|
syncOptions:
|
||||||
|
- CreateNamespace=true
|
||||||
|
source:
|
||||||
|
repoURL: git@github.com:amkartashov/gf-k8s.git
|
||||||
|
targetRevision: main
|
||||||
|
path: state/gullfaxi/system/kube-api/manifests
|
||||||
|
|
||||||
19
state/gullfaxi/system/kube-api/manifests/ingress.yaml
Normal file
19
state/gullfaxi/system/kube-api/manifests/ingress.yaml
Normal file
|
|
@ -0,0 +1,19 @@
|
||||||
|
apiVersion: networking.k8s.io/v1
|
||||||
|
kind: Ingress
|
||||||
|
metadata:
|
||||||
|
name: kubernetes
|
||||||
|
namespace: default
|
||||||
|
annotations:
|
||||||
|
nginx.ingress.kubernetes.io/ssl-passthrough: "true"
|
||||||
|
spec:
|
||||||
|
ingressClassName: nginx
|
||||||
|
rules:
|
||||||
|
- host: kubernetes.default.svc.cluster.local
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- pathType: ImplementationSpecific
|
||||||
|
backend:
|
||||||
|
service:
|
||||||
|
name: kubernetes
|
||||||
|
port:
|
||||||
|
number: 443
|
||||||
12
state/gullfaxi/system/kube-api/readme.md
Normal file
12
state/gullfaxi/system/kube-api/readme.md
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
# access kube api via ingress
|
||||||
|
|
||||||
|
Take kubeconfig generated by kubeadm, replace `server` with external address of ingress controller and add `tls-server-name: kubernetes.default.svc.cluster.local`.
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
- cluster:
|
||||||
|
certificate-authority-data: ...
|
||||||
|
#server: https://192.168.1.8:6443
|
||||||
|
server: https://ioot.xyz
|
||||||
|
tls-server-name: kubernetes.default.svc.cluster.local
|
||||||
|
name: gullfaxi
|
||||||
|
```
|
||||||
Loading…
Reference in a new issue