Skip to content

Commit

Permalink
update the-hard-way.md (#875)
Browse files Browse the repository at this point in the history
  • Loading branch information
cmssczy committed Feb 23, 2022
1 parent 77383b8 commit 27f0cfa
Showing 1 changed file with 18 additions and 10 deletions.
28 changes: 18 additions & 10 deletions docs/en/latest/practices/the-hard-way.md
Expand Up @@ -127,6 +127,10 @@ spec:
volumeMounts:
- name: data
mountPath: /etcd
# If you don't have a storage provisioner or don't want to use persistence volume, you could use an `emptyDir` as follow.
# volumes:
# - name: data
# emptyDir: {}
volumeClaimTemplates:
- metadata:
name: data
Expand Down Expand Up @@ -443,11 +447,13 @@ apiVersion: v1
kind: ServiceAccount
metadata:
name: apisix-ingress-controller
namespace: apisix
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: apisix-clusterrole
namespace: apisix
rules:
- apiGroups:
- ""
Expand Down Expand Up @@ -589,6 +595,7 @@ apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: apisix-clusterrolebinding
namespace: apisix
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
Expand Down Expand Up @@ -694,7 +701,7 @@ spec:
initContainers:
- name: wait-apisix-admin
image: busybox:1.28
command: ['sh', '-c', "until nc -z apisix-service.apisix.svc.cluster.local 9180 ; do echo waiting for apisix-admin; sleep 2; done;"]
command: ['sh', '-c', "until nc -z apisix-admin.apisix.svc.cluster.local 9180 ; do echo waiting for apisix-admin; sleep 2; done;"]
containers:
- name: ingress-controller
command:
Expand Down Expand Up @@ -730,20 +737,21 @@ After the ingress controller status is converted to `Running`, we could create a
Here is an example ApisixRoute:

```yaml
apiVersion: apisix.apache.org/v2beta1
apiVersion: apisix.apache.org/v2beta3
kind: ApisixRoute
metadata:
name: httpserver-route
namespace: demo
spec:
http:
- name: httpbin
match:
hosts:
- local.httpbin.org
paths:
- "/*"
backend:
serviceName: httpbin
- name: httpbin
match:
hosts:
- local.httpbin.org
paths:
- /*
backends:
- serviceName: httpbin
servicePort: 80
```

Expand Down

0 comments on commit 27f0cfa

Please sign in to comment.