1. liwm@rmaster01 liwm]$ kubectl create deployment myweb --image=nginx --dry-run=true -o yaml
    2. apiVersion: apps/v1
    3. kind: Deployment
    4. metadata:
    5. creationTimestamp: null
    6. labels:
    7. app: myweb
    8. name: myweb
    9. spec:
    10. replicas: 1
    11. selector:
    12. matchLabels:
    13. app: myweb
    14. strategy: {}
    15. template:
    16. metadata:
    17. creationTimestamp: null
    18. labels:
    19. app: myweb
    20. spec:
    21. containers:
    22. - image: nginx
    23. name: nginx
    24. resources: {}
    25. status: {}
    26. [liwm@rmaster01 liwm]$ kubectl explain deploy
    27. KIND: Deployment
    28. VERSION: apps/v1
    29. DESCRIPTION:
    30. Deployment enables declarative updates for Pods and ReplicaSets.
    31. FIELDS:
    32. apiVersion <string>
    33. APIVersion defines the versioned schema of this representation of an
    34. object. Servers should convert recognized schemas to the latest internal
    35. value, and may reject unrecognized values. More info:
    36. https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
    37. kind <string>
    38. Kind is a string value representing the REST resource this object
    39. represents. Servers may infer this from the endpoint the client submits
    40. requests to. Cannot be updated. In CamelCase. More info:
    41. https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
    42. metadata <Object>
    43. Standard object metadata.
    44. spec <Object>
    45. Specification of the desired behavior of the Deployment.
    46. status <Object>
    47. Most recently observed status of the Deployment.
    48. [liwm@rmaster01 liwm]$