标签:文件 always clu 自动 res 命令 try 参数说明 temp
参考资料:K8S拉取Django项目创建pod
文章中通过命令行方式关联,还需要手动修改svc参数
apiVersion: apps/v1 kind: Deployment metadata: creationTimestamp: null labels: app: iam name: iam namespace: iam spec: replicas: 3 selector: matchLabels: app: iam strategy: {} template: metadata: creationTimestamp: null labels: app: iam spec: containers: - image: registry.xxx.com/xxx/iam:1260cd6 name: iam imagePullPolicy: Always resources: {} ports: - containerPort: 9991 name: iamsvc protocol: TCP --- apiVersion: v1 kind: Service metadata: labels: app: iam name: iamsvc namespace: iam spec: ports: - port: 30333 nodePort: 30333 protocol: TCP targetPort: 9991 selector: app: iam type: NodePort
参数说明:
kind: Deployment
# kubectl get svc -n iam NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE iamsvc NodePort 10.10.7.99 <none> 30333:30333/TCP 9m15s #
kind: Service
# kubectl apply -f iam.deployment.yaml
标签:文件 always clu 自动 res 命令 try 参数说明 temp
原文地址:https://www.cnblogs.com/supery007/p/13371582.html