diff options
| author | hc <hc@email.ch> | 2025-05-30 22:51:55 +0800 |
|---|---|---|
| committer | hc <hc@email.ch> | 2025-05-30 22:51:55 +0800 |
| commit | 7b94af70555aab814f964a08098d0fb123171f7e (patch) | |
| tree | 2b8cf5793a7ecee85122133b4a59cad824e0c912 /docs | |
dev_env
Diffstat (limited to 'docs')
| -rw-r--r-- | docs | 48 |
1 files changed, 48 insertions, 0 deletions
@@ -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@<host> -p <port> +# Kubernetes (port forward - localhost only) +kubectl port-forward <pod-name> 2222:22 +ssh root@localhost -p 2222 +# Kubernetes (port forward - external access) +kubectl port-forward --address 0.0.0.0 <pod-name> 9999:22 +ssh root@<host> -p 9999 +``` |
