k8s create pod失败,cannot be handled as a Deployment: [pos 481]: json: expect char '"' but got char '1

Error from server (BadRequest): error when creating "mysql_deploy.yaml": Deployment in version "v1beta1" cannot be handled as a Deployment: [pos 481]: json: expect char '"' but got char '1'

下面是一个完整的yaml格式定义的文件,注意格式,子集包含关系,必须使要用空格,不能有tab,string类型的变量需要用单引号或者双引号。所有的元素不用都包含,按照实际应用场景配置即可。
        apiVersion: v1                                                
        kind: pod                                                     
        metadata:                                                     
          name: String                                                
          namespace: String                                           
          labels:                                                     
            - name: String                                            
          annotations:                                                
            - name: String                                            
        spec:                                                         
          containers:                                                 
          - name: String 
            image: String                                             
            imagePullPolicy: [Always|Never|IfNotPresent]            
            command: [String]                                     
            args: [String]                                            
            workingDir: String                                        
            volumeMounts:                                             
            - name: String 
              mountPath: String 
              readOnly: boolean
            ports:                                                    
            - name: String 
              containerPort: int                                      
              hostPort: int                                       
              protocol: String 
            env:                                                      
            - name: String 
              value: String 
            resources:                                                
              limits: 
                cpu: Srting 
                memory: String 
              requeste: 
                cpu: String 
                memory: String 
            livenessProbe:                                            
              exec: 
                command: [String] 
              httpGet:                                                
                path: String 
                port: number 
                host: String 
                scheme: Srtring 
                httpHeaders: 
                - name: Stirng 
                  value: String  
              tcpSocket:            
                port: number                                 
              initialDelaySeconds: 0
              timeoutSeconds: 0     
              periodSeconds: 0      
              successThreshold: 0 
              failureThreshold: 0 
              securityContext: 
                privileged: falae 
            restartPolicy: [Always|Never|OnFailure]
            nodeSelector: object    
            imagePullSecrets: 
            - name: String 
            hostNetwork: false      
          volumes:                  
          - name: String 
            meptyDir: {} 
            hostPath: 
              path: string 
            secret:                 
              secretName: String 
              item: 
              - key: String 
                path: String 
            configMap:              
              name: String
              items:
              - key: String
                path: String

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值