Skip to content

Commit 71218df

Browse files
docs: update namespace creation guide and refine examples (#345)
- Add documentation for creating namespaces using the `ac` CLI in `create_namespace.mdx`. - Remove hardcoded `namespace` fields and flags from DaemonSet and ConfigMap examples to improve clarity and usability.
1 parent db09773 commit 71218df

File tree

3 files changed

+14
-8
lines changed

3 files changed

+14
-8
lines changed

docs/en/developer/building_application/application_workloads/deamonset_create.mdx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ apiVersion: apps/v1
4949
kind: DaemonSet
5050
metadata:
5151
name: fluentd-elasticsearch
52-
namespace: kube-system
5352
labels:
5453
k8s-app: fluentd-logging
5554
spec:

docs/en/developer/building_application/configuration/add_configmap.mdx

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ apiVersion: v1
2525
kind: ConfigMap
2626
metadata:
2727
name: my-app-config
28-
namespace: default
2928
data:
3029
app_mode: "development"
3130
feature_flags: "true"
@@ -73,7 +72,6 @@ apiVersion: v1
7372
kind: ConfigMap
7473
metadata:
7574
name: app-config
76-
namespace: k-1
7775
data:
7876
APP_ENV: "production"
7977
LOG_LEVEL: "debug"
@@ -116,7 +114,7 @@ kubectl create configmap app-config \
116114
Or from a file:
117115

118116
```shell
119-
kubectl apply -f app-config.yaml -n k-1
117+
kubectl apply -f app-config.yaml
120118
```
121119

122120
## Operations
@@ -133,9 +131,9 @@ Changes to the ConfigMap will affect the workloads that reference the configurat
133131
## View, Edit and Delete by using the CLI
134132

135133
```shell
136-
kubectl get configmap app-config -n k-1 -o yaml
137-
kubectl edit configmap app-config -n k-1
138-
kubectl delete configmap app-config -n k-1
134+
kubectl get configmap app-config -o yaml
135+
kubectl edit configmap app-config
136+
kubectl delete configmap app-config
139137
```
140138

141139
## Ways to Use a ConfigMap in a Pod

docs/en/developer/building_application/namespace/create_namespace.mdx

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,16 @@ Refer to the official Kubernetes documentation: [Namespaces](https://kubernetes.
102102

103103
9. Click on **Create**.
104104

105-
## Creating namespace by using CLI
105+
## Creating namespace in a project by **ac** CLI
106+
107+
To use `ac` command-line tool to create a namespace in a project, run the following command:
108+
109+
```bash
110+
# Create a namespace in project with specific clusters
111+
ac adm new-project-namespace <namespace-name> --project <project-name> --cluster <cluster-name>
112+
```
113+
114+
## Creating namespace by **kubectl**
106115

107116
### YAML file examples \{#namespace-yaml}
108117

0 commit comments

Comments
 (0)