tinycodinglm / sys /sys-0009.jsonl
winapiadmin's picture
Upload folder using huggingface_hub (part 19)
034ba67 verified
|
Raw History Blame Contribute Delete
1.69 kB
{"type": "session", "harness": "deepseek-harness", "id": "sys-0009", "name": "Kubernetes ConfigMaps and Secrets"}
{"type": "message", "message": {"role": "system", "content": "You are an expert software engineer and technical assistant. You provide accurate, detailed, and practical answers. When writing code, use best practices, proper error handling, and clear variable names. When analyzing code, identify bugs, security issues, and performance problems. You have deep knowledge of C/C++, Windows API, Python, and many other technologies."}}
{"type": "message", "message": {"role": "user", "content": "How do I manage configuration in Kubernetes?"}}
{"type": "message", "message": {"role": "assistant", "content": "```yaml\napiVersion: v1\nkind: ConfigMap\nmetadata:\n name: app-config\ndata:\n DATABASE_URL: \"postgres://db:5432/mydb\"\n LOG_LEVEL: \"debug\"\n config.json: |\n {\"key\": \"value\", \"debug\": true}\n---\napiVersion: v1\nkind: Secret\nmetadata:\n name: app-secrets\ntype: Opaque\ndata:\n DB_PASSWORD: cGFzc3dvcmQxMjM= # base64 encoded\n API_KEY: c2VjcmV0a2V5\n---\napiVersion: v1\nkind: Pod\nmetadata:\n name: app\nspec:\n containers:\n - name: app\n image: myapp\n envFrom:\n - configMapRef:\n name: app-config\n - secretRef:\n name: app-secrets\n volumeMounts:\n - name: config-volume\n mountPath: /etc/config\n volumes:\n - name: config-volume\n configMap:\n name: app-config\n```\n\n```bash\nkubectl create configmap app-config --from-file=config.json\nkubectl create secret generic app-secrets --from-literal=DB_PASSWORD=pass123\nkubectl get secrets\nkubectl describe secret app-secrets\n```"}}