Deploying Harbor Registry

Preparation Get harbor offline/online I use offline method for the installation 1 2 3 $ mkdir ~/harbor-registry && cd ~/harbor-registry $ wget https://github.com/goharbor/harbor/releases/download/v2.11.2/harbor-offline-installer-v2.11.2.tgz $ tar xzvf harbor-offline-installer-v2.11.2.tgz You will need docker-compose this time 1 $ apt install docker-compose Deploy Setup configuration file Go to your harbor directory, it should be like this: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 ....

December 18, 2024 · 3 min · 575 words · Luqinthar Sudarsono

Connecting k3s to private registry

Steps Tips: add k3s completion bash Add bash completion 1 2 3 4 5 6 cat << EOF | tee -a ~/.profile source <(sudo k3s kubectl completion bash) alias k='kubectl' alias kubectl='sudo k3s kubectl' complete -o default -F __start_kubectl k EOF Reload profile 1 source ~/.profile Get the registry cert 1 $ sudo mkdir -p /certs/registry.lab7.local && cd /certs/registry.lab7.local You can copy your certs to the node, or download it if you put on webserver, then the cert to the directory....

December 13, 2024 · 2 min · 245 words · Luqinthar Sudarsono

Setup a simple private registry for kubernetes

Topology Deploying registry 1. Deploy registry container Assuming you already have a kubernetes cluster, let’s build the registry create basic auth 1 2 $ mkdir -p ~/docker-registry/auth && cd ~/docker-registry $ htpasswd -Bbn admin gladiators88 > auth/htpasswd Usage: htpasswd -Bbn [username] [password] deploying registry 1 2 3 4 5 6 7 8 $ docker run -d --name registry \ -v /root/docker-registry/creds/auth:/auth \ -v /docker:/var/lib/registry \ -e REGISTRY_AUTH=htpasswd \ -e REGISTRY_AUTH_HTPASSWD_REALM="Registry Realm" \ -e REGISTRY_AUTH_HTPASSWD_PATH=/auth/htpasswd \ -p 5000:5000 \ registry:2 Makesure the container is running well...

December 11, 2024 · 3 min · 472 words · Luqinthar Sudarsono

Deploying kubernetes dashboard

Preparation 1. Deploy metrics server First, we need to deploy metrics server before deploying kubernetes dashboard 1 kubectl apply -f https://github.com/kubernetes-sigs/metrics-server/releases/latest/download/components.yaml if you have a problem that metrics-server’s pod not running, probably because tls issue, so add --kubelet-insecure-tls on args section of deployment, then rollout restart it. Kubernetes dashboard 2. Deploy kubernetes dashboard 1 kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/v2.7.0/aio/deploy/recommended.yaml 3. Make user credential Service account 1 2 3 4 5 6 7 kubectl apply -f - << EOF apiVersion: v1 kind: ServiceAccount metadata: name: admin-user namespace: kubernetes-dashboard EOF Cluster Role Binding 1 2 3 4 5 6 7 8 9 10 11 12 13 14 kubectl apply -f - << EOF apiVersion: rbac....

January 15, 2024 · 1 min · 182 words · Luqinthar Sudarsono

Wordpress kubernetes with external database and bind9

Setup Database server 1. Install mariadb or mysql 1 apt install mysql-server -y 2. Configure mysql-server to bind 0.0.0.0 1 vim /etc/mysql/mysql.conf.d/mysqld.cnf => bind-address to 0.0.0.0 3. Create new user for wordpress 1 2 3 mysql -u root CREATE USER 'wp-user'@'%' IDENTIFIED BY 'gladiators88'; GRANT ALL PRIVILEGES ON *.* TO 'wp-user'@'%' WITH GRANT OPTION; GRANT ALL PRIVILEGES ON *.* TO 'wp-user'@'%'; Setup bind9 4. Install bind9 1 apt install bind9 5....

January 9, 2024 · 3 min · 523 words · Luqinthar Sudarsono