-
Notifications
You must be signed in to change notification settings - Fork 1
Kubernetes
Cengiz Ilerler edited this page Oct 7, 2022
·
20 revisions
!!! tip Minikube initial start
```powershell
minikube start --container-runtime=containerd --memory 8192 --cpus 2;
minikube node add;
minikube tunnel --cleanup;
```
Use https://artifacthub.io/ to find the packages.
helm repo add stable https://charts.helm.sh/stable;
helm repo add incubator https://charts.helm.sh/incubator;
helm repo add kubernetes-dashboard https://kubernetes.github.io/dashboard;
helm repo add jetstack https://charts.jetstack.io;
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts;
helm repo add minio https://operator.min.io/;
helm repo add grafana https://grafana.github.io/helm-charts;
helm repo add ingress-nginx https://kubernetes.github.io/ingress-nginx;
helm repo add dapr https://dapr.github.io/helm-charts;
helm repo add bitnami https://charts.bitnami.com/bitnami;
helm repo add elastic https://helm.elastic.co;
helm repo add kubevious https://helm.kubevious.io;
helm repo add ingress-nginx https://kubernetes.github.io/ingress-nginx;
helm repo add argo https://argoproj.github.io/argo-helm;
helm repo update;
helm search repo bitnami;
!!! danger minikube
Do **NOT** install kubernetes-dashboard if you are using minikube.
Use `minikube dashboard` instead.
helm install kubernetes-dashboard kubernetes-dashboard/kubernetes-dashboard --namespace=kube-system --set extraArgs="{--enable-skip-login}";
yaml
- name: kubernetes-dashboard
values:
- extraArgs:
- --enable-skip-login
!!! tip Link http://localhost:8001/api/v1/namespaces/kube-system/services/https:kubernetes-dashboard:https/proxy/
!!!
kubectl -n kube-system port-forward $(kubectl get pods -n kube-system -l "app.kubernetes.io/name=kubernetes-dashboard,app.kubernetes.io/instance=kubernetes-dashboard" -o jsonpath="{.items[0].metadata.name}") 8443:8443
helm upgrade --atomic -i kubevious kubevious/kubevious -n kubevious --create-namespace --version 0.7.22
helm install cert-manager jetstack/cert-manager --namespace cert-manager --create-namespace --set installCRDs=true;
helm install prometheus prometheus-community/prometheus --namespace observability --create-namespace;
!!! info Port Forwarding
```powershell
kubectl --namespace observability port-forward $(kubectl get pods --namespace observability -l "app=prometheus,component=server" -o jsonpath="{.items[0].metadata.name}") 9090
```
helm install promtail grafana/promtail --set config.clients[0].url="http://loki-loki-distributed-gateway/loki/api/v1/push" --namespace observability --create-namespace
helm install minio-operator minio/operator --namespace minio-operator --create-namespace;
helm install minio-observability minio/tenant --namespace observability;
kubectl --namespace minio-operator get secret console-sa-secret -o jsonpath="{.data.token}" | ForEach-Object {[System.Text.Encoding]::UTF8.GetString([System.Convert]::FromBase64String($_))};
kubectl --namespace observability port-forward svc/minio1-console 9443:9443;
!!! help default credentials
```text
user `minio`
pass `minio123`
```
helm install loki grafana/loki-distributed --namespace observability --create-namespace;
helm install tempo grafana/tempo-distributed --namespace observability --create-namespace --set storage.trace.backend="s3",storage.trace.s3.bucket="tempo",storage.trace.s3.endpoint="minio1-hl:9000",storage.trace.s3.access_key="minio",storage.trace.s3.secret_key="minio123",storage.trace.s3.insecure=true
helm install mimir grafana/mimir-distributed --namespace observability --create-namespace
helm install grafana grafana/grafana --namespace observability --set plugins="{raintank-worldping-app,grafana-azure-data-explorer-datasource,marcusolsson-json-datasource}",persistence.enabled=true,service.port=3000,service.type=LoadBalancer;
kubectl --namespace observability port-forward $(kubectl get pods --namespace observability -l "app.kubernetes.io/name=grafana,app.kubernetes.io/instance=grafana" -o jsonpath="{.items[0].metadata.name}") 3000
!!! help default credentials
```text
user `admin`
pass <run the command below>
```
```powershell
kubectl get secret --namespace observability grafana -o jsonpath="{.data.admin-password}" | ForEach-Object {[System.Text.Encoding]::UTF8.GetString([System.Convert]::FromBase64String($_))};
```
helm install rabbitmq bitnami/rabbitmq --namespace default --set image.tag=3.8.9-debian-10-r20,auth.user=user,auth.password=user,service.port=5672,service.metricsPort=9419,metrics.enabled=true,rabbitmq.plugins="rabbitmq_management rabbitmq_peer_discovery_k8s rabbitmq_shovel rabbitmq_shovel_management rabbitmq_management_themes"
yaml
- name: rabbitmq
chart: bitnami/rabbitmq
namespace: default
values:
- image:
tag: 3.8.9-debian-10-r20
service:
port: 5672
metricsPort: 9419
metrics:
enabled: true
auth:
username: "user"
password: "user"
rabbitmq:
plugins: "rabbitmq_management rabbitmq_peer_discovery_k8s rabbitmq_shovel rabbitmq_shovel_management rabbitmq_management_themes"
helm install redis bitnami/redis --namespace default --set image.tag=6.0.9-debian-10-r0,master.service.port=6379,metrics.enabled=true,metrics.port=9121,usePassword=false;
yaml
- name: redis
chart: bitnami/redis
namespace: default
values:
- image:
tag: 6.0.9-debian-10-r0
master:
service:
port: 6379
metrics:
enabled: true
port: 9121
usePassword: false
helm install dapr dapr/dapr --namespace dapr-system --wait --create-namespace
!!! tip Link
http://localhost:8001/api/v1/namespaces/dapr-system/services/dapr-dashboard:8080/proxy/
helm install mssql-linux stable/mssql-linux --namespace default --set image.repository=cilerler/mssql-server-linux,image.tag=2017-CU16,service.port=1433,service.type=LoadBalancer,persistence.enabled=true,acceptEula.value=Y,edition.value=Developer,agent.enabled=true;
kubectl get secret --namespace default mssql-linux-secret -o jsonpath="{.data.sapassword}" | ForEach-Object {[System.Text.Encoding]::UTF8.GetString([System.Convert]::FromBase64String($_))};
helm upgrade mssql-linux stable/mssql-linux --namespace default --reuse-values --recreate-pods --wait --set image.repository=mcr.microsoft.com/mssql/server,image.tag=2017-CU16-ubuntu;
# kubectl run mssqlcli --image=mcr.microsoft.com/mssql-tools -it --restart=Never --rm=true -- /bin/bash
# sqlcmd -S mssql-linux.default,1433 -U sa
##cilerler/prometheus-sql-exporter
helm install prometheus-sql-exporter cilerler/prometheus-sql-exporter --namespace default --set-string podAnnotations."prometheus\.io/scrape"=true,podAnnotations."prometheus\.io/port"=9399;
yaml
- name: prometheus-sql-exporter
chart: cilerler/prometheus-sql-exporter
namespace: default
podAnnotations:
prometheus.io/scrape: "true"
prometheus.io/port: "9399"
helm install my-release bitnami/mongodb
helm install cerebro stable/cerebro --namespace default --set image.tag=latest,service.port=9000,service.type=LoadBalancer;
helm install elasticsearch elastic/elasticsearch --namespace default --set ingress.enabled=true,service.type=LoadBalancer,antiAffinity=soft,resources.requests.cpu=100m,resources.requests.memory=512M,resources.limits.cpu=300m,resources.limits.memory=1024M,volumeClaimTemplate.storageClassName=hostpath,volumeClaimTemplate.resources.requests.storage=100M,esJavaOpts="-Xmx128m -Xms128m" --version 6.5.0;
helm install kibana elastic/kibana --namespace default --set ingress.enabled=true,service.port=5601,service.type=LoadBalancer,resources.requests.cpu=100m,resources.requests.memory=512M,resources.limits.cpu=1000m,resources.limits.memory=512M --version 6.5.0;
helm install ingress-nginx ingress-nginx/ingress-nginx --namespace default --version 2.12.1 --set controller.metrics.enabled=true;