Can I access k3s using just kubectl (no sudo and no k3s command)
Can I access k3s using just kubectl (no sudo and no k3s command)
Reddit Ā· reddit.com [1]
Right after installing k3s you are going to need to use sudo to use any kubectl command. The reason for this is that the default config is owned by root. To get around this you will need to make your own config and set the KUBECONFIG environment variable
To do this I used sudo one last time to copy the k3s.yaml file into my own directory and take ownership of it.
sudo cp /etc/rancher/k3s/k3s.yaml /home/waylon/.config/kube
sudo chown -R waylon:waylon ~/.config/kube
export KUBECONFIG=~/.config/kube/k3s.yaml
Note
This post is a thought [2]. Itās a short note that I make
about someone elseās content online #thoughts
References:
[1]: https://www.reddit.com/r/kubernetes/comments/cojjf5/can_i_access_k3s_using_just_kubectl_no_sudo_and/
[2]: /thoughts/
Published
All published posts
2493 posts
latest post 2026-05-11
Publishing rhythm
Quick-Start Guide | K3s
This guide will help you quickly launch a cluster with default options. Make sure your nodes meet the requirements before proceeding.
docs.k3s.io [1]
I recently spun up k3s in my homelab [2]. Iām trying to offload some work off of my free tier fly.io app in order to keep it free tier without crashing.
# install and start k3s
curl -sfL https://get.k3s.io | sh -
# check to see if your nodes are started
sudo kubectl get nodes
My main hiccup so far was the machine I am running on runs zfs on root, and it would not start the master node. Rather than figuring out how to make zfs play nice I just pointed k3s to a drive that is not zfs.
# manuallly
sudo k3s server -d /mnt/vault/.rancher/k3s
# without editing systemd service
sudo ln -s /mnt/vault/.rancher/k3s /var/lib/rancher/k3s
Note
This post is a thought [3]. Itās a short note that I make
about someone elseās content online #thoughts
References:
[1]: https://docs.k3s.io/quick-start
[2]: /homelab/
[3]: /thoughts/
Check out djmaze [1] and their project docker-caching-proxy [2].
Caching proxy docker image
References:
[1]: https://github.com/djmaze
[2]: https://github.com/djmaze/docker-caching-proxy
-
Tailwind comes with space that I have never heard of that is made to give margin and padding together in one class. Adam dropped it here in the Tailwind Connect conference.
Note
This post is a thought [1]. Itās a short note that I make
about someone elseās content online #thoughts
References:
[1]: /thoughts/
Looking for inspiration? oterm [1] by ggozad [2].
a text-based terminal client for Ollama
References:
[1]: https://github.com/ggozad/oterm
[2]: https://github.com/ggozad
Litestar: Effortlessly Build Performant APIs
We all know about Flask and Django. And of course FastAPI made a huge splash when it came on the scene a few years ago. But new web frameworks are being created all the time. And they have these ea...
talkpython.fm [1]
Litestar is an interesting api framework similar to fastpi, that I am interested to check out to see if it fits into some project scope. It sounds like it comes with a lot more batteries included for things like auth, but does not have hard opinions like django. At this point Iām not jumping off of fastapi [2], but its something I want to try.
Note
This post is a thought [3]. Itās a short note that I make
about someone elseās content online #thoughts
References:
[1]: https://talkpython.fm/episodes/show/433/litestar-effortlessly-build-performant-apis
[2]: /fastapi/
[3]: /thoughts/
Delete a Postgres Cluster
Documentation and guides from the team at Fly.io.
Fly Ā· fly.io [1]
Deleting a fly postgres db cluster was not straightforward to me as the app name is not inferred from the toml like it is for the main app.
fly apps destroy <pg-app-name>
fly pg db list -a <pg-app-name>
Note
This post is a thought [2]. Itās a short note that I make
about someone elseās content online #thoughts
References:
[1]: https://fly.io/docs/postgres/managing/deleting/
[2]: /thoughts/
![[None]]
Yet again twitter cards were causing me pain. This time it was me not realizing that they require full urls, and not relative or abolute urls.
This was not working
<meta name="twitter:image" content="/shot/?path={{ request.url|quote_plus }}" content-type='image/png'/>
This does work with a full url
<meta name="twitter:image" content="https://thoughts.waylonwalker.com/shot/?path={{ request.url|quote_plus }}" content-type='image/png'/>
Note
This post is a thought [1]. Itās a short note that I make
about someone elseās content online #thoughts
References:
[1]: /thoughts/
-
Boot.dev is crushing it with these interviews. This one has Wes Bos, includes teaching, webdev, where is webdev headed.
Note
This post is a thought [1]. Itās a short note that I make
about someone elseās content online #thoughts
References:
[1]: /thoughts/
gen.nvim [1] by David-Kunz [2] is a game-changer in its space. Excited to see how it evolves.
Neovim plugin to generate text using LLMs with customizable prompts
References:
[1]: https://github.com/David-Kunz/gen.nvim
[2]: https://github.com/David-Kunz
[1]
This seems like a promising tool to use with ollama.
Note
This post is a thought [2]. Itās a short note that I make
about someone elseās content online #thoughts
References:
[1]: /static/https://github.com/David-Kunz/gen.nvim
[2]: /thoughts/
Ollama
Ollama is the easiest way to automate your work using open models, while keeping your data safe.
ollama.ai [1]
ollama is the easiest to get going local llm tool that I have tried, and seems to be crazy fast. It feels faster than chat gpt, which has not been the experience I have had previously with running llmās on my hardware.
curl https://i.jpillora.com/jmorganca/ollama | bash
ollama serve
ollama run mistral
ollama run codellama:7b-code
ollama list
Note
This post is a thought [2]. Itās a short note that I make
about someone elseās content online #thoughts
References:
[1]: https://ollama.ai/
[2]: /thoughts/
Check out Boeing [1] and their project config-file-validator [2].
Cross Platform tool to validate configuration files
References:
[1]: https://github.com/Boeing
[2]: https://github.com/Boeing/config-file-validator
If youāre into interesting projects, donāt miss out on NeoTweet [1], created by ChristianChiarulli [2].
No description available.
References:
[1]: https://github.com/ChristianChiarulli/NeoTweet
[2]: https://github.com/ChristianChiarulli
GitHub - sysid/sse-starlette
Contribute to sysid/sse-starlette development by creating an account on GitHub.
GitHub Ā· github.com [1]
sse-FastAPI [2].">starlette provides server sent events for startlette and FastApi. Iām evaluating for use with htmx [3].
Installation: # [4]
pip install sse-starlette
Usage: # [5]
import asyncio
import uvicorn
from starlette.applications import Starlette
from starlette.routing import Route
from sse_starlette.sse import EventSourceResponse
async def numbers(minimum, maximum):
for i in range(minimum, maximum + 1):
await asyncio.sleep(0.9)
yield dict(data=i)
async def sse(request):
generator = numbers(1, 5)
return EventSourceResponse(generator)
routes = [
Route("/", endpoint=sse)
]
app = Starlette(debug=True, routes=routes)
if __name__ == "__main__":
uvicorn.run(app, host="0.0.0.0", port=8000, log_level='info')
Note
This post is a thought [6]. Itās a short note that I make
about someone elseās content online #thoughts
References:
[1]: https://github.com/sysid/sse-starlette
[2]: /fastapi/
[3]: /htmx/
[4]: #installation
[5]: #usage
[6]: /thoughts/
overflow - Layout
Utilities for controlling how an element handles content that is too large for the container.
tailwindcss.com [1]
Controlling overflow with tailwindcss
Examples # [2]
<div class="overflow-visible ..."></div>
<div class="overflow-hidden ..."></div>
Note
This post is a thought [3]. Itās a short note that I make
about someone elseās content online #thoughts
References:
[1]: https://tailwindcss.com/docs/overflow
[2]: #examples
[3]: /thoughts/
[1]
Default scrollbars on a dark theme website are just the ugliest thing. This page covers all the pseudo selectors needed to style the scrollbar.
/* width */
::-webkit-scrollbar {
width: 10px;
}
/* Track */
::-webkit-scrollbar-track {
background: #f1f1f1;
}
/* Handle */
::-webkit-scrollbar-thumb {
background: #888;
}
/* Handle on hover */
::-webkit-scrollbar-thumb:hover {
background: #555;
}
Note
This post is a thought [2]. Itās a short note that I make
about someone elseās content online #thoughts
References:
[1]: /static/https://www.w3schools.com/howto/howto_css_custom_scrollbar.asp
[2]: /thoughts/
[1]
Wincent (Greg Hurrel) has a pretty solid and fast zshrc. I recently grabbed his completion section and it seems to be working better than whatever I had.
zsh completion snippet
#
# Completion
#
fpath=($HOME/.zsh/completions $fpath)
autoload -U compinit
compinit -u
# Make completion:
# - Try exact (case-sensitive) match first.
# - Then fall back to case-insensitive.
# - Accept abbreviations after . or _ or - (ie. f.b -> foo.bar).
# - Substring complete (ie. bar -> foobar).
zstyle ':completion:*' matcher-list '' '+m:{[:lower:]}={[:upper:]}' '+m:{[:upper:]}={[:lower:]}' '+m:{_-}={-_}' 'r:|[._-]=* r:|=*' 'l:|=* r:|=*'
# Colorize completions using default `ls` colors.
zstyle ':completion:*' list-colors ''
# Allow completion of ..<Tab> to ../ and beyond.
zstyle -e ':completion:*' special-dirs '[[ $PREFIX = (../)#(..) ]] && reply=(..)'
# $CDPATH is overpowered (can allow us to jump to 100s of directories) so tends
# to dominate completion; exclude path-directories from the tag-order so that
# they will only be used as a fallback if no completions are found.
zstyle ':completion:*:complete:(cd|pushd):*' tag-order 'local-directories named-directories'
# Categorize completion...
Change Autocomplete Styles in WebKit Browsers | CSS-Tricks
We got a nice tip from Lydia Dugger via email with a method for changing the styles that WebKit browsers apply to form fields that have been autocompleted.
CSS-Tricks Ā· css-tricks.com [1]
All the hover, select, autofil, focus combinations have left me confused on how to consistently get my form elements styled in dark mode
This snippet from CSS tricks has fixed all the different states for me to give me full control.
/* Change Autocomplete styles in Chrome*/
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
textarea:-webkit-autofill,
textarea:-webkit-autofill:hover,
textarea:-webkit-autofill:focus,
select:-webkit-autofill,
select:-webkit-autofill:hover,
select:-webkit-autofill:focus {
border: 1px solid green;
-webkit-text-fill-color: green;
-webkit-box-shadow: 0 0 0px 1000px #000 inset;
transition: background-color 5000s ease-in-out 0s;
}
Note
This post is a thought [2]. Itās a short note that I make
about someone elseās content online #thoughts
References:
[1]: https://css-tricks.com/snippets/css/change-autocomplete-styles-webkit-browsers/
[2]: /thoughts/
GitHub - florimondmanca/arel: Lightweight browser hot reload for Python ASGI web apps
Lightweight browser hot reload for Python ASGI web apps - florimondmanca/arel
GitHub Ā· github.com [1]
arel is a āLightweight browser hot reload for Python ASGI web appsā
I just implemented this on my thoughts website using fastapi [2], and itās incredibly fast and lightweight. There just two lines of js that make a web socket connection back to the backend that watches for changes.
When in development mode, this snippet gets injected directly on the page and does a refresh when arel detects a change.
const ws = new WebSocket("ws://localhost:5000/hot-reload");
ws.onmessage = () => window.location.reload();
Note
This post is a thought [3]. Itās a short note that I make
about someone elseās content online #thoughts
References:
[1]: https://github.com/florimondmanca/arel
[2]: /fastapi/
[3]: /thoughts/