一、创建crd

1、创建 appservice-crd.yaml 

[root@k8s-master opdemo]# cat appservice-crd.yaml 
apiVersion: apiextensions.k8s.io/v1beta1
kind: CustomResourceDefinition
metadata:
 name: foos.app.example.com
spec:
 group: app.example.com
 version: v1
 names:
  kind: AppService
  plural: foos
 scope: Namespaced

2、创建appservice.yaml

apiVersion: app.example.com/v1
kind: AppService
metadata:
  name: nginx-app
spec:
  size: 2
  image: nginx:1.7.9
  ports:
    - port: 80
      targetPort: 80
      nodePort: 3000

 

相关文章:

  • 2021-03-30
  • 2021-09-02
  • 2021-08-06
  • 2022-02-20
  • 2021-10-13
  • 2021-09-23
猜你喜欢
  • 2021-12-31
  • 2021-10-19
  • 2021-12-24
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案