K8s/Run: Difference between revisions

From Chorke Wiki
Jump to navigation Jump to search
(Created page with "==References== {| | valign="top" | * Helm » Prometheus Stack * Helm » Cert Manager * Helm » Prometheus * Helm » PostgreSQL * Helm » SonarQube * Helm » Grafana * Helm » Jenkins * Helm » GitLab * Helm » MinIO * Helm | valign="top" | * Helm » Camunda * Helm/Keycloak|Helm...")
 
No edit summary
Line 1: Line 1:
==Kubectl » Run==
===Kubectl » Run » PSQL===
<syntaxhighlight lang="bash">
kubectl -n postgresql run -i --tty --rm psql --image=alpine --restart=Never -- sh
echo -n password: ;read -s PGPASSWORD;export PGPASSWORD
apk --update add postgresql-client inetutils-telnet
psql -d postgres -U postgres -h postgresql.postgresql
psql -d postgres -U postgres -h postgresql
</syntaxhighlight>
===Kubectl » Run » Redis CLI===
<syntaxhighlight lang="bash">
kubectl -n redis run -i --tty --rm redis-cli --image=alpine --restart=Never -- sh
echo -n password: ;read -s REDISCLI_AUTH;export REDISCLI_AUTH;echo
apk --update add redis inetutils-telnet
echo 'ping'|redis-cli -h redis-headless.redis
echo 'ping'|redis-cli -h redis-headless
</syntaxhighlight>
===Kubectl » Run » MinIO CLI===
<syntaxhighlight lang="bash">
kubectl -n minio run -i --tty --rm minio-cli --image=alpine --restart=Never -- sh
apk --update add minio-client inetutils-telnet
echo -n password: ;\
read -s MINIO_SERVER_ROOT_PASSWORD;\
export  MINIO_SERVER_ROOT_PASSWORD;\
export  MINIO_SERVER_ROOT_USER=admin;\
export  MINIO_SERVER_HOST=minio.k8s.local;echo
mcli ping --error-count 5 minio.minio
mcli ping --error-count 5 minio
mcli ping --count 5 minio.minio
mcli ping --count 5 minio
telnet minio.minio 9000
telnet minio 9000
telnet minio.minio 9001
telnet minio 9001
</syntaxhighlight>
==Kubectl » Apply==
==References==
==References==
{|
{|

Revision as of 20:47, 26 August 2024

Kubectl » Run

Kubectl » Run » PSQL

kubectl -n postgresql run -i --tty --rm psql --image=alpine --restart=Never -- sh
echo -n password: ;read -s PGPASSWORD;export PGPASSWORD
apk --update add postgresql-client inetutils-telnet

psql -d postgres -U postgres -h postgresql.postgresql
psql -d postgres -U postgres -h postgresql

Kubectl » Run » Redis CLI

kubectl -n redis run -i --tty --rm redis-cli --image=alpine --restart=Never -- sh
echo -n password: ;read -s REDISCLI_AUTH;export REDISCLI_AUTH;echo
apk --update add redis inetutils-telnet

echo 'ping'|redis-cli -h redis-headless.redis
echo 'ping'|redis-cli -h redis-headless

Kubectl » Run » MinIO CLI

kubectl -n minio run -i --tty --rm minio-cli --image=alpine --restart=Never -- sh
apk --update add minio-client inetutils-telnet

echo -n password: ;\
read -s MINIO_SERVER_ROOT_PASSWORD;\
export  MINIO_SERVER_ROOT_PASSWORD;\
export  MINIO_SERVER_ROOT_USER=admin;\
export  MINIO_SERVER_HOST=minio.k8s.local;echo

mcli ping --error-count 5 minio.minio
mcli ping --error-count 5 minio

mcli ping --count 5 minio.minio
mcli ping --count 5 minio

telnet minio.minio 9000
telnet minio 9000

telnet minio.minio 9001
telnet minio 9001

Kubectl » Apply

References