From 7b94af70555aab814f964a08098d0fb123171f7e Mon Sep 17 00:00:00 2001 From: hc Date: Fri, 30 May 2025 22:51:55 +0800 Subject: dev_env --- docs | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 docs (limited to 'docs') diff --git a/docs b/docs new file mode 100644 index 0000000..50aca64 --- /dev/null +++ b/docs @@ -0,0 +1,48 @@ +# Rocky SSH Container +Rocky Linux development environment with SSH access for Podman and Kubernetes. + +## Launcher Commands +```bash +# Check image status and show build commands +python3 launcher.py +python3 launcher.py run +python3 launcher.py run -p 2222 +python3 launcher.py list +python3 launcher.py cleanup +``` + +## Kubernetes Commands +```bash +kubectl apply -f rocky-ssh-deployment.yaml +# Check pods with IPs +kubectl get pods -l app=rocky-dev-deploy -o wide +# Check services (networking), get deployment is for stateless (not this) +kubectl get svc rocky-dev-deploy-svc +# Delete specific pod (auto-recreates) +kubectl delete pod rocky-dev-deploy-0 +# Scale replicas +kubectl scale statefulset rocky-dev-deploy --replicas=10 +kubectl delete -f rocky-ssh-deployment.yaml +``` + +## Local Registry (for Kubernetes) +```bash +# Run a local registry +podman run -d -p 5000:5000 --name registry registry:2 +# Tag and push to local registry +podman tag localhost/rocky_dev:latest localhost:5000/rocky_dev:latest +podman push localhost:5000/rocky_dev:latest --tls-verify=false +# Update image in rocky-ssh-deployment.yaml to: localhost:5000/rocky_dev:latest +``` + +## SSH Access +```bash +# Podman (launcher shows connection command) +ssh root@ -p +# Kubernetes (port forward - localhost only) +kubectl port-forward 2222:22 +ssh root@localhost -p 2222 +# Kubernetes (port forward - external access) +kubectl port-forward --address 0.0.0.0 9999:22 +ssh root@ -p 9999 +``` -- cgit v1.2.3-70-g09d2