- Defining Namespace Variable (namespace name)
NS="my-namespace"- Retrieve the namespace api state specification
Based on k3d.io
| #!/bin/bash | |
| # Check if script is run as root | |
| if [[ $EUID -ne 0 ]]; then | |
| echo "This script must be run as root. Please use sudo." | |
| exit 1 | |
| fi | |
| # Update package index | |
| if command -v apt-get &> /dev/null; then |
| #https://hub.docker.com/r/linuxserver/code-server | |
| docker run -d \ | |
| --name=code-server \ | |
| -e PUID=1000 \ | |
| -e PGID=1000 \ | |
| -e TZ=Etc/UTC \ | |
| -e PASSWORD="${PASSWORD}" \ | |
| -e SUDO_PASSWORD="${SUDO_PASSWORD}" \ | |
| -e DEFAULT_WORKSPACE=/config/workspace \ |
| #!/bin/bash | |
| # Colors | |
| GREEN='\033[0;32m' | |
| RED='\033[0;31m' | |
| NC='\033[0m' # No Color | |
| # https://github.com/owenthereal/ccat/releases | |
| CCAT_VER="1.1.0" | |
| BIN_DIR="${HOME}/.local/bin" |
| #!/bin/bash | |
| #-- --------------------------- | |
| #-- Author: alexolinux ------- | |
| #-- --------------------------- | |
| k3dCheck(){ | |
| command -v k3d > /dev/null | |
| if [ $? -eq 0 ]; then |
| #!/bin/bash | |
| set -e | |
| echo "Starting Helm Installation..." | |
| curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 | |
| chmod +x get_helm.sh | |
| ./get_helm.sh |
| #!/bin/bash | |
| # Remove/clean UP | |
| clear && echo "Seek and Remove!" | |
| sleep 3 | |
| kubeadm reset -f | |
| sudo rm -rf /etc/cni /etc/kubernetes /var/lib/dockershim /var/lib/etcd /var/lib/kubelet /var/run/kubernetes ~/.kube/* | |
| iptables -F && iptables -X | |
| iptables -t nat -F && iptables -t nat -X |
| syntax on | |
| set showcmd | |
| set hlsearch | |
| set wildmenu | |
| set ai | |
| set si | |
| set et | |
| set sw=2 | |
| set ts=2 |
| #!/bin/bash | |
| labserver_list=( | |
| host1.mylabserver.com | |
| host2.mylabserver.com | |
| host3.mylabserver.com | |
| ) | |
| echo "Backing Up Hosts..." | |
| sudo cp -p /etc/hosts /etc/hosts.save |