Post

My Boss Passed Away Suddenly What Do I Do Next

In this guide, we will walk you through the necessary steps to take over your self-hosted infrastructure when your boss, the chief administrator, passes away unexpectedly. This article assumes you.

My Boss Passed Away Suddenly: What Do I Do Next?

In this guide, we will walk you through the necessary steps to take over your self-hosted infrastructure when your boss, the chief administrator, passes away unexpectedly. This article assumes you are an experienced sysadmin or DevOps engineer with a basic understanding of Linux, Docker, and Kubernetes.

Prerequisites

  • Operating System: Ubuntu 20.04 LTS (Focal Fossa)
  • Docker CE: v5.0.8+
  • Kubernetes: v1.21.0+

Step 1: Gain Access to the Server

First, SSH into your self-hosted server using your account with administrative privileges. If you don’t have access, contact your organization for the necessary credentials.

1
ssh username@your_server_ip

Step 2: Backup Critical Data and Configuration Files

Before making any changes, it is essential to create a backup of crucial data and configuration files. This includes Docker Compose, Kubernetes YAML files, and other infrastructure-related settings.

1
2
3
4
5
6
# Create a directory for the backups
mkdir -p /backups/infrastructure

# Copy all relevant configuration files to the backup folder
cp -r /etc/docker/* /backups/infrastructure
cp -r ~/.kube/* /backups/infrastructure

Step 3: Update System and Software Packages

Ensure that your server’s system and software packages are up-to-date before proceeding with any changes.

1
2
3
4
5
# Update the package list
sudo apt update

# Upgrade all installed packages
sudo apt upgrade -y

Step 4: Take Over Docker Services

To take over the Docker services, replace the existing username in the following commands with your own username.

Update Docker User and Group

1
2
3
4
5
6
# Create a new group for yourself (replace 'yourusername' with your actual username)
sudo usermod -aG docker yourusername

# Log out and log back in so that your group membership is re-evaluated.
exit
loginctl reconfigure

Modify the Docker Configuration File

Edit the /etc/docker/daemon.json file to allow rootless access:

1
sudo nano /etc/docker/daemon.json

Add the following content to the file, then save and exit:

1
2
3
{
  "userns-remap": "{ \"user\": \"yourusername\", \"group\": \"yourusername\" }"
}

Restart Docker Service

Restart the Docker service for the changes to take effect:

1
sudo systemctl restart docker

Step 5: Take Over Kubernetes Cluster

To take over the Kubernetes cluster, you’ll need to replace yourusername with your actual username and configure RBAC permissions.

Edit kubeconfig file

Locate your kubeconfig file (usually found in ~/.kube/config) and update the user section as follows:

1
2
3
4
5
6
users:
- name: yourusername
  user:
    exec:
      command: /usr/local/bin/kubectl
      arg: config set-context --current --namespace=your-namespace

Update Cluster Role Bindings

Update the clusterrolebinding-your-service.yaml file to assign the appropriate cluster roles to your new account. You can find an example here.

Apply Changes

Apply the updated clusterrolebinding-your-service.yaml file to your Kubernetes cluster:

1
kubectl apply -f clusterrolebinding-your-service.yaml

Troubleshooting

If you encounter issues during this process, consult the official Docker and Kubernetes documentation for troubleshooting tips:

Conclusion

In this guide, we have walked you through the steps to take over a self-hosted infrastructure when your boss passes away unexpectedly. By following these instructions, you can ensure minimal downtime and maintain the stability of your DevOps workflow using open-source tools like Docker and Kubernetes. Keep in mind that security considerations should always be at the forefront of your mind, especially when working with critical infrastructure components.

This article is meant for experienced sysadmins and DevOps engineers who are already familiar with Linux, Docker, and Kubernetes. If you are new to these technologies or need more in-depth explanations, consider exploring their official documentation before attempting to manage a self-hosted infrastructure.

This post is licensed under CC BY 4.0 by the author.