Closed tanlay closed 1 year ago
已经搞定了。
apiVersion: apps.tanlay.com/v1
kind: Application
metadata:
name: nginx-sample
namespace: default
labels:
app: nginx
spec:
deployment:
replicas: 3
selector:
matchLabels:
app: nginx
template:
metadata:
labels:
app: nginx
spec:
containers:
- image: nginx
name: nginx
ports:
- containerPort: 80
service:
type: NodePort
ports:
- port: 80
targetPort: 80
nodePort: 30880
$ kubectl get app
NAME AGE
nginx-sample 10m
书籍150页。 代码逻辑写完,执行make install后,可以查询到crd,但是查询不到application资源,应该是需要编写application资源的yaml文件,然后创建。yaml不知道咋写,各位大佬支援下呢,谢谢!