blob: 50aca647791948ea0fbd6b3be8cc80ac19d04810 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
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
```
|