如何更改仪表板管理员

时间:2019-01-29 16:00:48

标签: ubuntu kubernetes rbac

我跑了

const context = cast.framework.CastReceiverContext.getInstance();
const playbackConfig = new cast.framework.PlaybackConfig();
// Customize the license url for playback
playbackConfig.licenseUrl = 'http://widevine/yourLicenseServer';
playbackConfig.licenseRequestHandler = requestInfo => {
  requestInfo.withCredentials = true;
};
context.start({playbackConfig: playbackConfig});

// Update playback config licenseUrl according to provided value in load request.
context.getPlayerManager().setMediaPlaybackInfoHandler((loadRequest, playbackConfig) => {
  if (loadRequest.media.customData && loadRequest.media.customData.licenseUrl) {
    playbackConfig.licenseUrl = loadRequest.media.customData.licenseUrl;
  }
  return playbackConfig;
});

代替

kubectl create clusterrolebinding dashboard-admin -n default --clusterrole=cluste-admin --serviceaccount=default:dashboard

我想将仪表板管理员设置为cluster-admin而不是cluste-admin

如果我运行

kubectl create clusterrolebinding dashboard-admin -n default --clusterrole=cluster-admin --serviceaccount=default:dashboard

终端输出

来自服务器的错误(已存在):clusterrolebinding.rbac.authorizatoin.k8s.io“ dashboard-admin”已经存在

当我从计算机上的浏览器访问仪表板时,系统会提示您输入令牌并能够按预期登录。我有很多错误都找不到“ cluste-admin”。我希望这些都消失

1 个答案:

答案 0 :(得分:1)

现在要实现这一目标的唯一方法是删除clusterrolebinding并使用以下命令重新创建它:

kubectl delete clusterrolebinding dashboard-admin
kubectl create clusterrolebinding dashboard-admin -n default --clusterrole=cluster-admin --serviceaccount=default:dashboard