u/William_Myint_01

why ReadWriteOncePod access mode is only supported for CSI volumes?

Hi, I knowledge that CSI mean Container Storage Interface which is like an API that I can create the driver of my own and connect with it. But to do that it's like java interface in OOP which means there are rules I must follow to write driver for CSI.

And also in previous days by reading the doc I knowledge that driver plugins are build inside K8s Core code so that's where CSI come.

I knowledge that ReadWriteOncePod make sure that one specific pod can only read the volume but why it must be CSI volumes?

Thank you so much for your time to answer my question.

reddit.com
u/William_Myint_01 — 2 days ago

Is it true that EXPOSE in Dockerfile and containerPort in Kubernetes are just for documentation?

I was learning Kubernetes using AI and it told me that EXPOSE in Dockerfile and containerPort in K8s Pod spec are just documentation and don't actually do anything. Is this really true? If so, what actually opens the port then? And what's the point of writing them if they don't do anything?

Any answers would be appreciated.

Thank you so much

reddit.com
u/William_Myint_01 — 10 days ago
▲ 28 r/devops

Junior DevOps/System Engineer here still learning to code. I feel like reading code teaches me more than writing it. Am I tripping?

So I'm pretty new to the industry. Still learning to code but somehow landed a full time job as a System Engineer / DevOps. Still can't believe it honestly lol.

But here's the thing I've been noticing — my job is mostly infra and operations stuff. And part of my job I have to read code from tools, scripts, open source projects.

And honestly? **Reading other people's code has taught me way more than when I try to write something from scratch.** Like I actually understand how things work when I read real code being used in production.

Now I'm confused about how I should be learning:

- Should I focus more on reading code than writing at my stage?

- Or is writing still something I need to grind even if it feels disconnected from my actual job?

- Maybe I'm just avoiding the hard part lol

I don't wanna stay on the infra side forever. I know I need coding to level up my career. Just not sure what the right approach is as a junior who is still figuring everything out.

Anyone been in this spot before? Would love some honest thoughts 🙏

reddit.com
u/William_Myint_01 — 1 month ago

**[Question] Deployment shows 4 replicas but only 3 pods running — why?**

Hi everyone, I'm learning Kubernetes and ran into a confusing situation.

**What happened step by step:**

  1. Deployed with wrong image tag (`:latest` which didn't exist on Docker Hub)

  2. All 4 pods went into `ImagePullBackOff`

  3. Fixed the image to `:1.2.0` and ran `kubectl apply -f .`

  4. Rolling update started but only 3 new pods came up — 4th never created

  5. `kubectl rollout restart` fixed it and all 4 pods ran fine

**My confusion:** I thought Kubernetes always tries to fulfill whatever I define in the spec. If I say `replicas: 4`, why did it stop at 3 and just... give up? Why didn't it keep retrying once the old broken pods were cleaned up and quota was free again?

**My Deployment:**

```yaml

apiVersion: apps/v1

kind: Deployment

metadata:

name: color-api-depl

namespace: dev

spec:

replicas: 4

selector:

matchLabels:

app: color-api

template:

metadata:

labels:

app: color-api

spec:

containers:

- name: color-api

image: waiyanbhonemyint/color-api:1.2.0

resources:

requests:

cpu: "200m"

memory: "256Mi"

limits:

cpu: "500m"

memory: "512Mi"

ports:

- containerPort: 8080

```

**ResourceQuota in dev namespace:**

```

Resource Used Hard

requests.cpu 600m 1000m

requests.memory 768Mi 1Gi

```

**kubectl describe deployment showed:**

```

Conditions:

ReplicaFailure True FailedCreate

NewReplicaSet: color-api-depl-5585964745 (3/4 replicas created)

```

**My understanding so far:** During the rolling update, old broken pods were still counted against the quota. When Kubernetes tried to create the 4th new pod, quota was full so it hit `FailedCreate`. By the time old pods were cleaned up and quota freed, Kubernetes had gone into exponential backoff and stopped retrying.

Is that correct? And is `kubectl rollout restart` really the right fix here or is there a better way to handle this?

Thank you!

https://preview.redd.it/mkgg5ncirt0h1.png?width=938&format=png&auto=webp&s=e4dc265b84d2ef231a9d7d3247b6c01b5fd91088

reddit.com
u/William_Myint_01 — 2 months ago