Posts

Azure AKS how to test local dns enabled

After turning on localdns on your specific nodepool, we can use the following method to test if it is turned on.  Let's use the yaml here to place our pod into the nodepool.  apiVersion: v1 kind: Pod metadata:   name: dnstest-specific-node spec:   nodeName: <your-node-name> # Forces the pod onto this specific node   containers:   - name: test     image: busybox:1.28     command: ["sleep", "3600"] And then run kubectl apply -f <file-above>  kubectl apply -f dns-test-node.yaml kubectl exec -it dnstest-specific-node -- nslookup kubernetes.default Check the Server field in the output: 169.254.10.10 or 169.254.10.11 : The native AKS LocalDNS feature is enabled and actively working. 169.254.20.10 : The open-source NodeLocal DNSCache (DaemonSet) is enabled and working. 10.0.0.10 (or similar 10.x.x.10 ): Local DNS is not enabled . The pod is talking directly to the cluster's centralized CoreDNS service over the networ

android understanding the differences between Stateflow, mutableStateOf, rememberSavable

 In Jetpack Compose, both mutableStateOf and rememberSaveable are used to manage state, but they operate on completely different levels of the Android lifecycle. The Problem: Recomposition Wipes the Slate Clean In traditional Android (XML), a UI element like an EditText stays on the screen forever, holding onto its own text. In Jetpack Compose, UI elements are just functions . When data changes, Compose runs those functions all over again from the top to draw the updated screen. This process is called Recomposition . The intention is to trigger an update to the UI if anything changes.  mutableStateOf makes your data reactive (updates the UI), while rememberSaveable protects that data from being wiped out when the user rotates the screen or switches apps. 1. remember In Jetpack Compose, remember is a built-in memory guard. Its sole job is to protect a variable from being destroyed and reset when your UI redraws itself. To understand why it is absolutely necessary, you fir...