- 404: Page not found -
-Sorry, we've misplaced that URL or it's pointing to something that doesn't exist.
- -diff --git a/_site/404.html b/_site/404.html deleted file mode 100644 index 8bff19c..0000000 --- a/_site/404.html +++ /dev/null @@ -1,1724 +0,0 @@ - - - - - - - - - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - -Sorry, we've misplaced that URL or it's pointing to something that doesn't exist.
- -I’m Trever Ehrfurth, a full time data engineer by trade, and a homelab enthusiast for fun. I enjoy learning new tools and technologies, automation, developing pipelines, and building cool stuff. I am an open source advocate and contributor and enjoy working with passionate developers to create better tools.
- -I hope you find something helpful here and that we can enjoy this learning journey together!
- -This repository contains all the basic cheatsheets you need to get started to make notes in obsidian.
-Helpful Proxmox commands to reference as a cheat sheet
-Helpful Terraform commands to reference as a cheat sheet
-Helpful Kubectl commands to reference as a cheat sheet
-Helpful Helm commands to reference as a cheat sheet
-Helpful Docker commands to reference as a cheat sheet
-Helpful Git commands to reference as a cheat sheet
-Documentation on how to setup an NFS mount for persistent storage in any kubernetes deployment.
-An overview of my current homelab including hardware, software, and networking.
-Helpful Docker commands to reference as a cheat sheet
- - - -COMMAND | -DESCRIPTION | -
---|---|
docker run <image> |
- Start a new container from an image | -
docker run -it <image> |
- Start a new container in interactive mode | -
docker run --rm <image> |
- Start a new container and remove it when it exits | -
docker create <image> |
- Create a new container | -
docker start <container> |
- Start a container | -
docker stop <container> |
- Graceful stop a container | -
docker kill <container> |
- Kill (SIGKILL) a container | -
docker restart <container> |
- Graceful stop and restart a container | -
docker pause <container> |
- Suspend a container | -
docker unpause <container> |
- Resume a container | -
docker rm <container> |
- Destroy a container | -
COMMAND | -DESCRIPTION | -
---|---|
docker stop $(docker ps -q) |
- To stop all the running containers | -
docker stop $(docker ps -a -q) |
- To stop all the stopped and running containers | -
docker kill $(docker ps -q) |
- To kill all the running containers | -
docker kill $(docker ps -a -q) |
- To kill all the stopped and running containers | -
docker restart $(docker ps -q) |
- To restart all running containers | -
docker restart $(docker ps -a -q) |
- To restart all the stopped and running containers | -
docker rm $(docker ps -q) |
- To destroy all running containers | -
docker rm $(docker ps -a -q) |
- To destroy all the stopped and running containers | -
docker pause $(docker ps -q) |
- To pause all running containers | -
docker pause $(docker ps -a -q) |
- To pause all the stopped and running containers | -
docker start $(docker ps -q) |
- To start all running containers | -
docker start $(docker ps -a -q) |
- To start all the stopped and running containers | -
docker rm -vf $(docker ps -a -q) |
- To delete all containers including its volumes use | -
docker rmi -f $(docker images -a -q) |
- To delete all the images | -
docker system prune |
- To delete all dangling and unused images, containers, cache and volumes | -
docker system prune -a |
- To delete all used and unused images | -
docker system prune --volumes |
- To delete all docker volumes | -
COMMAND | -DESCRIPTION | -
---|---|
docker ps |
- List running containers | -
docker ps --all |
- List all containers, including stopped | -
docker logs <container> |
- Show a container output | -
docker logs -f <container> |
- Follow a container output | -
docker top <container> |
- List the processes running in a container | -
docker diff |
- Show the differences with the image (modified files) | -
docker inspect |
- Show information of a container (json formatted) | -
COMMAND | -DESCRIPTION | -
---|---|
docker attach <container> |
- Attach to a container | -
docker cp <container>:<container-path> <host-path> |
- Copy files from the container | -
docker cp <host-path> <container>:<container-path> |
- Copy files into the container | -
docker export <container> |
- Export the content of the container (tar archive) | -
docker exec <container> |
- Run a command inside a container | -
docker exec -it <container> /bin/bash |
- Open an interactive shell inside a container (there is no bash in some images, use /bin/sh) | -
docker wait <container> |
- Wait until the container terminates and return the exit code | -
COMMAND | -DESCRIPTION | -
---|---|
docker image ls |
- List all local images | -
docker history <image> |
- Show the image history | -
docker inspect <image> |
- Show information (json formatted) | -
docker tag <image> <tag> |
- Tag an image | -
docker commit <container> <image> |
- Create an image (from a container) | -
docker import <url> |
- Create an image (from a tarball) | -
docker rmi <image> |
- Delete images | -
docker pull <user>/<repository>:<tag> |
- Pull an image from a registry | -
docker push <user>/<repository>:<tag> |
- Push and image to a registry | -
docker search <test> |
- Search an image on the official registry | -
docker login |
- Login to a registry | -
docker logout |
- Logout from a registry | -
docker save <user>/<repository>:<tag> |
- Export an image/repo as a tarball | -
docker load |
- Load images from a tarball | -
COMMAND | -DESCRIPTION | -
---|---|
docker volume ls |
- List all vol1umes | -
docker volume create <volume> |
- Create a volume | -
docker volume inspect <volume> |
- Show information (json formatted) | -
docker volume rm <volume> |
- Destroy a volume | -
docker volume ls --filter="dangling=true" |
- List all dangling volumes (not referenced by any container) | -
docker volume prune |
- Delete all volumes (not referenced by any container) | -
docker run --rm --volumes-from <container> -v $(pwd):/backup busybox tar cvfz /backup/backup.tar <container-path> |
- Backup a container | -
docker run --rm --volumes-from <container> -v $(pwd):/backup busybox sh -c "cd <container-path> && tar xvf /backup/backup.tar --strip 1" |
- Restore a container from backup | -
Helpful Git commands to reference as a cheat sheet
- - - -Command | -Description | -
---|---|
git init |
- Initialize a new Git repository | -
git clone <url> |
- Clone a remote repository | -
git status |
- Show the working tree status | -
git add <file> |
- Add a file to the staging area | -
git commit -m <message> |
- Commit changes to the repository | -
git push |
- Push changes to the remote repository | -
git pull |
- Pull changes from the remote repository | -
git fetch |
- Fetch changes from the remote repository | -
git merge <branch> |
- Merge a branch into the current branch | -
git branch |
- List all branches | -
git branch <branch> |
- Create a new branch | -
git checkout <branch> |
- Switch to a branch | -
git checkout -b <branch> |
- Create and switch to a new branch | -
git branch -d <branch> |
- Delete a branch | -
git log |
- Show commit logs | -
git diff |
- Show changes between commits | -
git blame <file> |
- Show who changed each line in a file | -
git reflog |
- Show a log of changes to HEAD | -
git reset --hard <commit> |
- Reset the repository to a commit | -
git revert <commit> |
- Revert a commit | -
git stash |
- Stash changes in the working directory | -
git stash pop |
- Apply stashed changes to the working directory | -
git tag <tag> |
- Create a tag for a commit | -
Command | -Description | -
---|---|
git config --global user.name <user> |
- Set the user name for Git | -
git config --global user.email <email> |
- Set the user email for Git | -
git config --global core.editor <editor> |
- Set the default text editor for Git | -
git config --global color.ui auto |
- Enable colored output for Git | -
Command | -Description | -
---|---|
git remote add <repository> <url> |
- Add a remote repository | -
git remote -v |
- List remote repositories | -
git remote show <repository> |
- Show information about a remote repository | -
git remote rename <repository> <new_repository> |
- Rename a remote repository | -
git remote remove <repository> |
- Remove a remote repository | -
Helpful Helm commands to reference as a cheat sheet
- - - -Command | -Description | -
---|---|
helm repo list |
- List Helm repositories | -
helm repo update |
- Update list of Helm charts from repositories | -
Command | -Description | -
---|---|
helm search |
- List all installed charts | -
helm search <chart> |
- Search for a chart | -
helm ls |
- List all installed Helm charts | -
helm ls --deleted |
- List all deleted Helm charts | -
helm ls --all |
- List installed and deleted Helm charts | -
helm inspect values <repo>/<chart> |
- Inspect the variables in a chart | -
Command | -Description | -
---|---|
helm install --name <name> <repo>/<chart> |
- Install a Helm chart | -
helm install --name <name> --values <VALUES.YML> <repo>/<chart> |
- Install a Helm chart and override variables | -
helm status <name> |
- Show status of Helm chart being installed | -
helm delete --purge <name> |
- Delete a Helm chart | -
Command | -Description | -
---|---|
helm get values <name> |
- Return the variables for a release | -
helm upgrade --values <file> <name> <repo>/<chart> |
- Upgrade the chart or variables in a release | -
helm history <name> |
- List release numbers | -
helm rollback <name> 1 |
- Rollback to a previous release number | -
Command | -Description | -
---|---|
helm create <name> |
- Create a blank chart | -
helm lint <name> |
- Lint the chart | -
helm package <name> |
- Package the chart into foo.tgz | -
helm dependency update |
- Install chart dependencies | -
Helpful Kubectl commands to reference as a cheat sheet
- - - -Command | -Description | -
---|---|
kubectl config view |
- Show the current kubeconfig file | -
kubectl config get-contexts |
- List all contexts in the kubeconfig file | -
kubectl config current-context |
- Show the current context | -
kubectl config use-context <context> |
- Change the current context | -
kubectl config set-context <context> --namespace=<namespace> |
- Set the namespace for a context | -
kubectl config set-context <context> --cluster=<cluster> |
- Set the cluster for a context | -
kubectl config set-context <context> --user=<user> |
- Set the user for a context | -
kubectl config set-context <context> --namespace=<namespace> --cluster=<cluster> --user=<user> |
- Set all context properties | -
Command | -Description | -
---|---|
kubectl cluster-info |
- Display addresses of the master and services | -
kubectl get nodes |
- List all nodes in the cluster | -
kubectl get pods |
- List all pods in the cluster | -
kubectl get services |
- List all services in the cluster | -
kubectl get deployments |
- List all deployments in the cluster | -
kubectl get namespaces |
- List all namespaces in the cluster | -
kubectl get events |
- List all events in the cluster | -
Command | -Description | -
---|---|
kubectl apply -f <file> |
- Apply a configuration file | -
kubectl delete -f <file> |
- Delete a configuration file | -
kubectl get <resource> |
- List all resources of a type | -
kubectl describe <resource> <name> |
- Describe a resource | -
kubectl edit <resource> <name> |
- Edit a resource | -
kubectl exec -it <pod> -- <command> |
- Execute a command in a pod | -
Command | -Description | -
---|---|
kubectl run <name> --image=<image> |
- Create a new pod | -
kubectl delete pod <name> |
- Delete a pod | -
kubectl get pod <name> |
- Get details of a pod | -
kubectl describe pod <name> |
- Describe a pod | -
kubectl logs <name> |
- Show logs of a pod | -
kubectl exec -it <name> -- /bin/bash |
- Execute a command in a pod | -
kubectl cp <pod>:<source> <destination> |
- Copy files from a pod | -
kubectl top node |
- Show metrics for all nodes | -
kubectl top pod |
- Show metrics for all pods | -
kubectl top pod <name> |
- Show metrics for a specific pod | -
Command | -Description | -
---|---|
kubectl expose pod <name> --port=444 --target-port=555 |
- Expose a pod as a service | -
kubectl delete service <name> |
- Delete a service | -
kubectl get service <name> |
- Get details of a service | -
kubectl describe service <name> |
- Describe a service | -
Command | -Description | -
---|---|
kubectl create deployment <name> --image=<image> |
- Create a new deployment | -
kubectl delete deployment <name> |
- Delete a deployment | -
kubectl get deployment <name> |
- Get details of a deployment | -
kubectl describe deployment <name> |
- Describe a deployment | -
kubectl scale deployment <name> --replicas=3 |
- Scale a deployment to 3 replicas | -
kubectl rollout status deployment/<name> |
- Check the status of a deployment rollout | -
kubectl rollout history deployment/<name> |
- Show the history of a deployment rollout | -
kubectl rollout undo deployment/<name> |
- Rollback a deployment to the previous version | -
kubectl rollout undo deployment/<name> --to-revision=1 |
- Rollback a deployment to a specific revision | -
Command | -Description | -
---|---|
kubectl create namespace <name> |
- Create a new namespace | -
kubectl delete namespace <name> |
- Delete a namespace | -
kubectl get namespace <name> |
- Get details of a namespace | -
kubectl describe namespace <name> |
- Describe a namespace | -
Documentation on how to setup an NFS mount for persistent storage in any kubernetes deployment.
- - - -1
-
sudo apt install -y nfs-common
-
Install NFS CSI driver
-nfs-pv.yaml
with the following:
- 1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-12
-13
-
apiVersion: v1
- kind: PersistentVolume
- metadata:
- name: nfs
- spec:
- capacity:
- storage: 20Gi
- accessModes:
- - ReadWriteMany
- storageClassName: nfs
- nfs:
- server: 192.168.1.24 # IP of NFS Server
- path: "/mnt/TREPOOL/TRESHARE" # NFS mount path
-
1
-
kubectl apply -f nfs-pv.yaml
-
nfs-pvc.yaml
with the following:
- 1
-2
-3
-4
-5
-6
-7
-8
-9
-10
-11
-
apiVersion: v1
- kind: PersistentVolumeClaim
- metadata:
- name: nfs
- spec:
- accessModes:
- - ReadWriteMany
- storageClassName: nfs
- resources:
- requests:
- storage: 20Gi
-
1
-
kubectl apply -f nfs-pvc.yaml
-
nfs-web.yaml
with the following:
- 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
-
apiVersion: apps/v1
- kind: Deployment
- metadata:
- name: nfs-web
- spec:
- replicas: 1
- selector:
- matchLabels:
- app: nfs-web
- template:
- metadata:
- labels:
- app: nfs-web
- spec:
- containers:
- - name: nfs-web
- image: nginx
- ports:
- - name: web
- containerPort: 80
- volumeMounts:
- - name: nfs
- mountPath: /usr/share/nginx/html # NFS path in pod
- volumes:
- - name: nfs
- persistentVolumeClaim:
- claimName: nfs
-
1
-
kubectl apply -f nfs-web.yaml
-
nfs-web-7bc97bcf48-5brq6
- 1
-
kubectl get pods
-
1
-
kubectl exec -it nfs-web-7bc97bcf48-5brq6 -- /bin/bash
-
1
-
cd /usr/share/nginx/html
-
An overview of my current homelab including hardware, software, and networking.
- - - -A lot of years, money and sleepless nights later, this homelab has gone through two or three major iterations
- -Servers: -Running 5 servers in a High Available cluster -All are from old gaming rigs. Every 3 years or so I buy a new gaming rig and toss the previous moba, ram, cpu, and psu into Rosewill 4U chassis. -Server 1: i7-12700K | GTX 1080TI -Server 2: i7-9700K | GTX 980TI -Server 3: i7-6700K -Server 4: i7-4790K -Server 5: AMD Ryzen 5 3600
- -As you can see from my Homepage dashboard, I run a bunch of services across multiple VM’s with high availability. If I ever take any server down, the VM’s are spun up on the remaining nodes in the cluster. Here are some of my services starting with the coolest.
- -Clusterplex: I took plex onestep further and deployed clusterplex by pabloromeo on github. This amazing developer created add-on is a way to distribute transcode jobs from one Plex server across multiple VM’s or workers. This has allowed me to scale out plex without ever taking up too much processing on any given server/VM. It is meant for Kubernetes and docker swarm but can be configured to work in normal docker containers. -Also using Tautulli for better metrics and observability of Plex -Wazuh: A wonderful SIEM solution I have deployed on all servers and computers on the network with active response rules, alerts to discord and vulnerability monitoring.
- -Uptime-Kuma: Super easy and quick uptime monitor for all services with notifications linked to discord for any outages.
- -Not shown on dashboard: Pterodactyl Game server
- -NGINX Proxy Manager: Reverse proxy for ip’s
- -Automated eBook and Audiobook library using Calibre, Readarr and Calibre-Web. (Account with myanonymouse)
- -Vaultwarden: selfhosted Bitwarden
- -Immich: Photo/Video backup Solution
- -This repository contains all the basic cheatsheets you need to get started to make notes in obsidian.
- - - -To Search for a specific note: Use Ctrl + P (Cmd + P on Mac).
- -For Internal Links: Use [[note name]]
to create internal links to other notes.
For External Links: Use [Text](URL)
to create external links.
For Bullet Points: Use -
, *
, or 1
.
For Headings: Use #
(e.g., # Heading 1, ## Heading 2).
For Code Blocks: Wrap text in triple backticks (
``)`.
For Embeds: Use ![[note name]]
to embed another note in your current note.
Quick Overview</em>
- -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
-
# Heading 1
-
-## Heading 2
-
---- Spacer
-
-- Bullet Points
-
-- [x] Checklist
-
-**Bold**
-
-*Italic*
-
-***Italic Bold***
-
-==Highlights==
-
-```Coding Blocks```
-
-[[Links]](Sources)
-
-> Quotes/ Blockquotes
-
-Table Cell A | Table Cell B
----- | ----
-
-
Detailed Cheat Sheet</em>
- -# Heading 1
- -# Heading 1
## Heading 2
Line Break
- ----
- Bullet
- [x] list
Bold
- -**text**
Italic
- - *text*
Italic Bold
- -***text***
==Highlights==
- -==this text is highlighted==
Coding Blocks
By putting 3 (`) signs before and after the code.
[[Links]]
- -[[link]](sources)
-- -Quotes/ Blockquotes
-
> this is a quote.
Table Cell A | Table Cell B -—- | —-
- -1
-2
-
Table Cell A | Table Cell B
----- | ----
-
Shortcut Key | Functions -:—————–:|—————–: -Ctrl + S|Editor: Saves the file -Ctrl + N| Creates a new note -Ctrl + P| Open command pallete -Ctrl + O | Opens Quick Switcher -Ctrl + Shift + F | Search in all files -Ctrl + G | Opens graph view -Ctrl + Alt + ← | Navigate Back -Ctrl + Alt + → | Navigate forth -Ctrl + F | Searches current file -Ctrl + E | Toggle edit/preview modes -Ctrl + , | Open Settings -Ctrl + Tab | Next tab -Ctrl + Shift + Tab | Previous tab -Alt + Tab | Next App -Alt + Shift + Tab | Previous App -Win + Tab | Task View -Win + Shift + Tab | Next Window
- -Shortcut Key | Functions -:—————–:|—————–: -Ctrl + B | Bold Selected Text -Ctrl + I | Italicize Selected Text -Ctrl + K | Insert External Link to Selected Text -Ctrl + ] | Indent -Ctrl + [ | Unindent -Ctrl + D |Delete current line -Ctrl + V | Duplicate current line -Ctrl + Click | Open Note in Current Panel via Link -Ctrl + Shift + Click | Open Note in New Panel via Link -Ctrl + P (Cmd + P on Mac) | Quick Search -Ctrl + N (Cmd + N on Mac) | New Note -Ctrl + Shift + D (Cmd + Shift + D on Mac) | Create a Daily Note -Ctrl + / (Cmd + / on Mac) | Toggle Command Palette -Ctrl + E (Cmd + E on Mac) | Open Graph View -Ctrl + Click (Cmd + Click on Mac) | Open Link in New Pane
- -Helpful Proxmox commands to reference as a cheat sheet
- - - -Command | -Command Description | -
---|---|
qm list |
- list VMs | -
qm create <vm> |
- Create or restore a virtual machine. | -
qm start <vm> |
- Start a VM | -
qm suspend <vm> |
- Suspend virtual machine. | -
qm shutdown <vm> |
- Shutdown a VM | -
qm reboot <vm> |
- Reboot a VM | -
qm reset <vm> |
- Reset a VM | -
qm stop <vm> |
- Stop a VM | -
qm destroy <vm> |
- Destroy the VM and all used/owned volumes. | -
qm monitor <vm> |
- Enter Qemu Monitor interface. | -
qm pending <vm> |
- Get the virtual machine configuration with both current and pending values. | -
qm sendkey <vm> <key_event> |
- Send key event to virtual machine. | -
qm showcmd <vm> |
- Show command line used to start the VM (debug info). | -
qm unlock <vm> |
- Unlock the VM | -
qm clone <vm> <new_vm> |
- Clone a VM | -
qm migrate <vm> <node> |
- Migrate a VM | -
qm status <vm> |
- Show VM status | -
qm template <vm> |
- Create a Template | -
qm set <vm> |
- Set virtual machine options (synchronous API) | -
Command | -Command Description | -
---|---|
qm cloudinit dump <vm> <type> |
- Get automatically generated cloudinit config. | -
qm cloudinit pending <vm> |
- Get the cloudinit configuration with both current and pending values. | -
qm cloudinit update <vm> |
- Regenerate and change cloudinit config drive. | -
Command | -Command Description | -
---|---|
qm disk import <vm> <source> <storage |
- Import an external disk image as an unused disk in a VM. | -
qm disk move <vm> <disk> |
- Move volume to different storage or to a different VM. | -
qm disk rescan |
- Rescan all storages and update disk sizes and unused disk images. | -
qm disk resize <vm> <disk> <size> |
- Extend volume size. | -
qm disk unlink <vm> --IDLIST <string> |
- Unlink/delete disk images. | -
qm rescan |
- Rescan volumes. | -
qemu-img convert <qcow2> <raw> |
- Convert qcow2 to raw | -
qemu-img convert -p -O qcow2 <raw> <qcow2> |
- Convert back to qcow2 | -
Command | -Command Description | -
---|---|
qm listsnapshot <vm> |
- List all snapshots. | -
qm snapshot <vm> <snapshot> |
- Snapshot a VM. | -
qm delsnapshot <vm> <snapshot> |
- Delete a snapshot. | -
qm rollback <vm> <snapshot> |
- Rollback a snapshot. | -
qm terminal <vm> |
- Open a terminal using a serial device. | -
qm vncproxy <vm> |
- Proxy VM VNC traffic to stdin/stdout. | -
Command | -Command Description | -
---|---|
qm guest cmd <vm> <command> |
- Execute Qemu Guest Agent commands. | -
qm guest exec <vm> |
- Executes the given command via the guest agent. | -
qm guest exec-status <vm> <pid> |
- Gets the status of the given pid started by the guest-agent. | -
qm guest passwd <vm> <user> |
- Sets the password for the given user to the given password. | -
Command | -Command Description | -
---|---|
pvcreate <disk> |
- Create a PV | -
pvremove <disk> |
- Remove a PV | -
pvs |
- List all PVs | -
vgcreate <vg> <disk> |
- Create a VG | -
vgremove <vg> |
- Remove a VG | -
vgs |
- List all VGs | -
lvcreate -L LV-SIZE -n <lv> <vg> |
- Create a LV | -
lvremove <vg>/<lv> |
- Remove a LV | -
lvs |
- List all LVs | -
Command | -Command Description | -
---|---|
pvesm add TYPE <storage> |
- Create a new storage | -
pvesm alloc <storage> <vm> <file> <size> |
- Allocate disk images | -
pvesm free <volume> |
- Delete volume | -
pvesm remove <storage> |
- Delete storage configuration | -
pvesm list <storage> |
- List storage content | -
pvesm lvmscan |
- An alias for pvesm scan lvm | -
pvesm lvmthinscan |
- An alias for pvesm scan lvmthin | -
pvesm scan lvm |
- List local LVM volume groups | -
pvesm scan lvmthin VG |
- List local LVM Thin Pools | -
pvesm status |
- Get status for all datastores | -
Command | -Command Description | -
---|---|
pveam available |
- List all templates | -
pveam list <storage> |
- List all templates | -
pveam download <storage> <template> |
- Download appliance templates | -
pveam remove <template> |
- Remove a template | -
pveam update |
- Update Container Template Database | -
Command | -Command Description | -
---|---|
pct list |
- List containers | -
pct create <vm> OSTEMPLATE |
- Create or restore a container | -
pct start <vm> |
- Start the container | -
pct clone <vm> <new_vm> |
- Create a container clone/copy | -
pct suspend <vm> |
- Suspend the container. This is experimental. | -
pct resume <vm> |
- Resume the container | -
pct stop <vm> |
- Stop the container. This will abruptly stop all processes running in the container. | -
pct shutdown <vm> |
- Shutdown the container. This will trigger a clean shutdown of the container. | -
pct destroy <vm> |
- Destroy the container (also delete all uses files) | -
pct status <vm> |
- Show CT status | -
pct migrate <vm> <target> |
- Migrate the container to another node. Creates a new migration task. | -
pct config <vm> |
- Get container configuration | -
pct cpusets |
- Print the list of assigned CPU sets | -
pct pending <vm> |
- Get container configuration, including pending changes | -
pct reboot <vm> |
- Reboot the container by shutting it down and starting it again. Applies pending changes. | -
pct restore <vm> <template> |
- Create or restore a container | -
pct set <vm> |
- Set container options | -
pct template <vm> |
- Create a Template | -
pct unlock <vm> |
- Unlock the VM | -
Command | -Command Description | -
---|---|
pct df <vm> |
- Get the container’s current disk usage | -
pct fsck <vm> |
- Run a filesystem check (fsck) on a container volume | -
pct fstrim <vm> |
- Run fstrim on a chosen CT and its mountpoints | -
pct mount <vm> |
- Mount the container’s filesystem on the host | -
pct move-volume <vm> <volume> |
- Move a rootfs-/mp-volume to a different storage or to a different container | -
pct unmount <vm> |
- Unmount the container’s filesystem | -
pct resize <vm> <disk> <size> |
- Resize a container mount point | -
pct rescan |
- Rescan all storages and update disk sizes and unused disk images | -
pct enter <vm> |
- Connect to container | -
pct console <vm> |
- Launch a console for the specified container | -
pct exec <vm> |
- Launch a command inside the specified container | -
pct pull <vm> <source> <destination> |
- Copy a file from the container to the local system | -
pct push <vm> <source> <destination> |
- Copy a local file to the container | -
Command | -Command Description | -
---|---|
service pveproxy restart |
- Restart the Proxmox web GUI | -
Helpful Terraform commands to reference as a cheat sheet
- - - -Command | -Description | -
---|---|
terraform fmt |
- Reformat your configuration in the standard style | -
terraform validate |
- Check whether the configuration is valid | -
Command | -Description | -
---|---|
terraform init |
- Prepare your working directory for other commands | -
Command | -Description | -
---|---|
terraform apply --auto-approve |
- Create or update infrastructure without confirmation prompt | -
terraform destroy --auto-approve |
- Destroy previously-created infrastructure without confirmation prompt | -
terraform plan -out plan.out |
- Output the deployment plan to plan.out | -
terraform apply plan.out |
- Use the plan.out to deploy infrastructure | -
terraform plan -destroy |
- Outputs a destroy plan | -
terraform apply -target=aws_instance.myinstance |
- Only apply/deploy changes to targeted resource | -
terraform apply -var myregion=us-east-1 |
- Pass a variable via CLI while applying a configuration | -
terraform apply -lock=true |
- Lock the state file so it can’t be modified | -
terraform apply refresh=false |
- Do not reconcile state file with real-world resources | -
terraform apply --parallelism=5 |
- Number of simultaneous resource operations | -
terraform refresh |
- Reconcile the state in Terraform state file with real-world resources | -
terraform providers |
- Get informatino about providers used in the current configuration | -
Command | -Description | -
---|---|
terraform workspace new <workspace> |
- Create a new workspace | -
terraform workspace select default |
- Change to a workspace | -
terraform workspace list |
- List all workspaces | -
Command | -Description | -
---|---|
terraform state show aws_instance.myinstance |
- Show details stored in the Terraform state file | -
terraform state pull > terraform.tfstate |
- Output Terraform state to a file | -
terraform state mv aws_iam_role.my_ssm_role module.mymodule |
- Move a resource tracked via state to different module | -
terraform state replace-provider hashicorp/aws registry.custom.com/aws |
- Replace an existing provider with another | -
terraform state list |
- List all resources tracked in the Terraform state file | -
terraform state rm aws_instance.myinstance |
- Unmanage a resource, delete it from the Terraform state file | -
Command | -Description | -
---|---|
terraform import <resource_type>.<resource> <id> |
- Import a Resource | -
terraform output |
- List all outputs | -
terraform output <output> |
- List a specific output | -
terraform output -json |
- List all outputs in JSON format | -
Command | -Description | -
---|---|
terraform login |
- Login to Terraform Cloud with an API token | -
terraform logout |
- Logout from Terraform Cloud | -