Skip to content

Instantly share code, notes, and snippets.

View jozko's full-sized avatar
:octocat:
YAML && 🤦‍♂️

Jozko Skrablin jozko

:octocat:
YAML && 🤦‍♂️
View GitHub Profile
@jozko
jozko / restore-rkestate-file.md
Created May 21, 2024 08:31 — forked from superseb/restore-rkestate-file.md
Recover cluster.rkestate file from controlplane node

Recover cluster.rkestate file from controlplane node

RKE

Run on controlplane node, uses any found hyperkube image

k8s 1.19 and higher

docker run --rm --net=host -v $(docker inspect kubelet --format '{{ range .Mounts }}{{ if eq .Destination "/etc/kubernetes" }}{{ .Source }}{{ end }}{{ end }}')/ssl:/etc/kubernetes/ssl:ro --entrypoint bash $(docker inspect $(docker images -q --filter=label=org.opencontainers.image.source=https://github.com/rancher/hyperkube.git) --format='{{index .RepoTags 0}}' | tail -1) -c 'kubectl --kubeconfig /etc/kubernetes/ssl/kubecfg-kube-node.yaml -n kube-system get configmap full-cluster-state -o json | jq -r .data.\"full-cluster-state\" | jq -r .' > cluster.rkestate
@jozko
jozko / vagrant-cheat-sheet.md
Created May 25, 2021 12:21 — forked from wpscholar/vagrant-cheat-sheet.md
Vagrant Cheat Sheet

Typing vagrant from the command line will display a list of all available commands.

Be sure that you are in the same directory as the Vagrantfile when running these commands!

Creating a VM

  • vagrant init -- Initialize Vagrant with a Vagrantfile and ./.vagrant directory, using no specified base image. Before you can do vagrant up, you'll need to specify a base image in the Vagrantfile.
  • vagrant init <boxpath> -- Initialize Vagrant with a specific box. To find a box, go to the public Vagrant box catalog. When you find one you like, just replace it's name with boxpath. For example, vagrant init ubuntu/trusty64.

Starting a VM

  • vagrant up -- starts vagrant environment (also provisions only on the FIRST vagrant up)
To convert Virtualbox VMs to VMware VMs, the state of the art is still not a "simple export and import".
Am surprised that it doesn't still work thst way. My VMWare player would quit without even errors. Linux, VMware & Tools ... Still long way to go.. Why can't something fail appropriately ?
Some commands need to be typed in the command lines. Here is the procedure that worked for me:
From Virtualbox, Export the VM to a folder. It could be saved either in the .OVA or .OVF formats.
In the command line, execute :
ovftool -tt vmx --lax soureVMfileaname.ova .
@jozko
jozko / install-comodo-ssl-cert-for-nginx.rst
Created December 7, 2018 15:16 — forked from bradmontgomery/install-comodo-ssl-cert-for-nginx.rst
Steps to install a Comodo PositiveSSL certificate with Nginx.

Setting up a SSL Cert from Comodo

I use Namecheap.com as a registrar, and they resale SSL Certs from a number of other companies, including Comodo.

These are the steps I went through to set up an SSL cert.

Purchase the cert