Skip to content

Commit

Permalink
Fix issuses
Browse files Browse the repository at this point in the history
Signed-off-by: Muhammad Raisul Islam Evan <[email protected]>
  • Loading branch information
Evanraisul committed Sep 18, 2024
1 parent 04002d5 commit 4cefee4
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 20 deletions.
30 changes: 21 additions & 9 deletions docs/examples/memcached/monitoring/builtin-prom-memcd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,25 @@ spec:
podTemplate:
spec:
containers:
- name: memcached
resources:
limits:
cpu: 500m
memory: 128Mi
requests:
cpu: 250m
memory: 64Mi
- name: memcached
resources:
limits:
cpu: 500m
memory: 256Mi
requests:
cpu: 500m
memory: 256Mi
monitor:
agent: prometheus.io/builtin
agent: prometheus.io/operator
prometheus:
serviceMonitor:
labels:
release: prometheus
exporter:
resources:
requests:
memory: 512Mi
cpu: 200m
limits:
memory: 512Mi
cpu: 250m
2 changes: 1 addition & 1 deletion docs/examples/memcached/monitoring/memcached.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ metadata:
name: coreos-prom-memcd
namespace: demo
spec:
replicas: 3
replicas: 1
version: "1.6.22"
deletionPolicy: WipeOut
podTemplate:
Expand Down
5 changes: 0 additions & 5 deletions docs/guides/memcached/autoscaler/compute/memcached.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ menu:
docs_{{ .version }}:
identifier: mc-auto-scaling
name: Memcached Autoscaling
parent: compute-auto-scaling
weight: 15
menu_name: docs_{{ .version }}
section_menu_id: guides
Expand Down Expand Up @@ -296,7 +295,6 @@ mcops-mc-autoscaler-compute-p1usdl VerticalScaling Successful 1m

We can see from the above output that the `memcachedOpsRequest` has succeeded.

Now, we are going to verify from the Pod, and the Memcached yaml whether the resources of the database has updated to meet up the desired state, Let's check,

```bash
$ kubectl get pod -n demo mc-autoscaler-compute-0 -o json | jq '.spec.containers[].resources'
Expand Down Expand Up @@ -324,11 +322,8 @@ $ kubectl get Memcached -n demo mc-autoscaler-compute -o json | jq '.spec.podTem
}
```


The above output verifies that we have successfully auto-scaled the resources of the Memcached database.



## Cleaning Up

To clean up the Kubernetes resources created by this tutorial, run:
Expand Down
2 changes: 1 addition & 1 deletion docs/guides/memcached/concepts/memcached-opsrequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ If you want to update your Memcacheds version, you have to
>You can only update between Memcached versions. KubeDB does not support downgrade for Memcached.

### spec.horizontalScaling
If you want to scale-up or scale-down your Memcached, you have to specify `spec.horizontalScaling section. This field consists of the following sub-field:
If you want to scale-up or scale-down your Memcached, you have to specify `spec.horizontalScaling` section. This field consists of the following sub-field:


- `spec.horizontalScaling.replicas` indicates the desired number of replicas for your Memcahced instance after scaling. For example, if your cluster currently has 4 replicas, and you want to add additional 2 replicas then you have to specify 6 in spec.horizontalScaling.replicas field. Similarly, if you want to remove one replicas, you have to specify 3 in spec.horizontalScaling.replicas field.
Expand Down
5 changes: 2 additions & 3 deletions docs/guides/memcached/monitoring/using-builtin-prometheus.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,12 +90,12 @@ $ kubectl apply -f https://github.com/kubedb/docs/raw/{{< param "info.version" >
memcached.kubedb.com/builtin-prom-memcd created
```

Now, wait for the database to go into `Running` state.
Now, wait for the database to go into `Ready` state.

```bash
$ kubectl get mc -n demo builtin-prom-memcd
NAME VERSION STATUS AGE
builtin-prom-memcd 1.6.22 Running 10s
builtin-prom-memcd 1.6.22 Ready 30s
```

KubeDB will create a separate stats service with name `{Memcached crd name}-stats` for monitoring purpose.
Expand Down Expand Up @@ -131,7 +131,6 @@ TargetPort: metrics/TCP
Endpoints: 10.244.0.186:56790
Session Affinity: None
Events: <none>
```
You can see that the service contains following annotations.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: Vertical Scaling Memcached
menu:
docs_{{ .version }}:
identifier: mc-vertical-scaling
name: Standalone
name: Memcached
parent: vertical-scaling
weight: 20
menu_name: docs_{{ .version }}
Expand Down

0 comments on commit 4cefee4

Please sign in to comment.