TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Ask HN: What are your best practices for interacting with Cloud

2 点作者 epimetheus2超过 3 年前
I am new to devops and we have multiple projects on GCP, with various kubernetes clusters.<p>What are the best practices to ensure I don&#x27;t mess up? E.g. always have current project&#x2F;cluster name in your prompt. What other things would you recommend?<p>I&#x27;m afraid of accidentally running something on wrong gcp project &#x2F; cluster combination out of mistake which will inevitably happen, taking down prod or something.

3 条评论

nickjj超过 3 年前
&gt; I&#x27;m afraid of accidentally running something on wrong gcp project &#x2F; cluster combination out of mistake which will inevitably happen<p>I think GitOps as a philosophy helps here a bit. All changes to your cluster(s) go through git with a PR &#x2F; review. Generally speaking you wouldn&#x27;t be running kubectl or any CLI tools on your dev box where you hope you&#x27;re working against the correct cluster or namespace.<p>I also like the idea of having a temporary test cluster that you routinely spin up and destroy for testing any type of Kubernetes upgrades or cluster-wide changes. This way you get a real result of how things will pan out before performing it on an important cluster.
verdverm超过 3 年前
You could remove the defaults and always specify them via flags to the gcloud CLI.<p>I have some bash functions which get&#x2F;set these defaults, so I will typically make sure I know what I am running against before executing a command.<p>If your DevOps setup is good, you should not be able to take down prod and it should be easy to rebuild. There should be controls, especially for deletion in prod. There is also rollback like capabilities.
yuppie_scum超过 3 年前
Measure twice, cut once