使用Ubuntu在虚拟盒子上安装Kubernetes [英] Installing Kubernetes on Virtual box with Ubuntu

查看:85
本文介绍了使用Ubuntu在虚拟盒子上安装Kubernetes的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在Ubuntu 16.04 VM上安装Kubernetes,我尝试了 https: //kubernetes.io/docs/getting-started-guides/kubeadm/,但API服务器无法启动.

I am trying to install Kubernetes on Ubuntu 16.04 VM, I tried this https://kubernetes.io/docs/getting-started-guides/kubeadm/, but the API server does not start.

与服务器localhost:8080的连接被拒绝-您是否指定了正确的主机或端口?

The connection to the server localhost:8080 was refused - did you specify the right host or port?

关于如何在Ubuntu VM上安装Kubernetes的程序很好

Is there a good procedure on how to install Kubernetes on Ubuntu VM

推荐答案

您可能尚未设置kubectl的凭据.

You probably haven't set up the credentials for kubectl.

sudo cp /etc/kubernetes/admin.conf $HOME/ && sudo chown $(id -u):$(id -g) $HOME/admin.conf; if ! fgrep -q KUBECONFIG= $HOME/.bashrc; then echo 'export KUBECONFIG=$HOME/admin.conf' >> $HOME/.bashrc; fi;. $HOME/.bashrc

它将/etc/kubernetes/admin.conf带到主目录,并被当前用户读取.还要调整.bashrc以将KUBECONFIG环境变量设置为指向该admin.conf.

It takes /etc/kubernetes/admin.conf to the home directory and makes it readable by current user. Also adjusts .bashrc to set the KUBECONFIG environment variable to point to that admin.conf.

这篇关于使用Ubuntu在虚拟盒子上安装Kubernetes的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆