据我了解,
Metallb 是一个负载均衡器,它为服务分配 IP 地址,该服务可以暴露给外界。
Nginx Ingress 和普通的 Nginx 一样,但它驻留在 kubernetes 中,并提供到不同路由的路由。
我的问题是,如果我有 Nginx Ingress,为什么还需要 Metallb?因为 nginx 入口会将端口 80/443 公开给公共,我可以使用它来路由到我需要的服务。
谢谢你。
Kubernetes 新手我很难登录到 kubernetes 仪表板。
我跟着:https : //github.com/kubernetes/dashboard/wiki/Creating-sample-user
和
kubectl get clusterrolebinding admin-user -n kube-system -o yaml
显示:
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
annotations:
kubectl.kubernetes.io/last-applied-configuration: |
{"apiVersion":"rbac.authorization.k8s.io/v1","kind":"ClusterRoleBinding","metadata":{"annotations":{},"name":"admin-user"},"roleRef":{"apiGroup":"rbac.authorization.k8s.io","kind":"ClusterRole","name":"cluster-admin"},"subjects":[{"kind":"ServiceAccount","name":"admin-user","namespace":"kube-system"}]}
creationTimestamp: "2019-01-15T15:48:33Z"
name: admin-user
resourceVersion: "2096"
selfLink: /apis/rbac.authorization.k8s.io/v1/clusterrolebindings/admin-user
uid: 0361cb77-18dd-11e9-b02d-bc305b9f3aeb
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: cluster-admin
subjects:
- kind: ServiceAccount
name: admin-user
namespace: kube-system
Run Code Online (Sandbox Code Playgroud)
现在kubectl -n kube-system get secret | egrep admin没有显示任何内容(与上面页面的声明相矛盾......)我错过了什么?
蒂亚!
我使用多种 Google 云服务。我工作的一些 Cloud Storage 存储桶位于项目 A 中,可以通过我自己的帐户访问,而另一些存储桶位于项目 B 中,我只能使用服务帐户访问。我激活了适当的服务帐户
gcloud auth activate-service-account --key-file mykey.json
在随后的登录过程中我只是使用
gcloud config set account service_account
我还需要切换我的活动项目,为此我使用了命令
gcloud config set project project-B
服务帐户工作得很好,允许我访问存储在 Google Cloud Storage 上的特定 bitbucket,但后来我需要使用 Argo 提交 kubernetes 工作流程,所以我使用以下命令切换回我的帐户和项目
gcloud config set account my_account
gcloud config set project project-A
Run Code Online (Sandbox Code Playgroud)
使用“gcloud auth list”我可以看到 my_account 处于活动状态
ACTIVE ACCOUNT
service_account.iam.gserviceaccount.com
* my_account
Run Code Online (Sandbox Code Playgroud)
但是当我尝试提交运行“kubectl -n default get services”时出现以下错误:
Error from server (Forbidden): services is forbidden: User "service_account.iam.gserviceaccount.com" cannot list resource "services" in API group "" in …Run Code Online (Sandbox Code Playgroud) permissions google-cloud-storage google-cloud-platform kubernetes