How to upgrade kubectl server version - docker

On Windows 10 Pro, I installed docker and the Kubernetes cli. I upgraded the kubectl.exe to version 1.15 by replacing the old one in the docker folder. When I run “kubectl version”, it shows the client version as 1.15, but the server version still shows as 1.10. How can I upgrade the server version to 1.15?

Welcome to SO !, I assume you are using Kubernetes cluster, that is available as an installation option of Docker Desktop for Windows. In that case you cannot easily upgrade your Kubernetes cluster (server side), as its particular version is bundled with Docker Desktop installer (e.g. Docker Community Edition 2.0.0.2 2019-01-16 comes with Kubernetes 1.10.11 version).
If you want to have a full control over Kubernetes version (server side/control plane) please check minikube tool, which lets you specify it by adding '--kubernetes-version' argument (minikube start --kubernetes-version v1.15.0). With minikube there is still an option to re-use the Docker daemon inside the VM (started with 'minikube start command' in the background).

You need to upgrade kubernetes control plane.
you can use below commands to upgrade k8s cluster if the cluster is setup using kubeadm
export VERSION="1.15"
export ARCH=amd64
wget https://storage.googleapis.com/kubernetes-release/release/v${VERSION}/bin/linux/amd64/kubeadm > /usr/bin/kubeadm
chmod a+rx /usr/bin/kubeadm
kubeadm upgrade apply ${VERSION}

Related

Teamcity - Unmet requirements: docker.server.osType contains windows

I installed Docker Desktop 2.0.0.3 on my Teamcity (build 61245) Build Agent and restarted the Build Agent/Server, I've also switch to run Windows containers but I am still getting
Unmet requirements: docker.server.osType contains windows
Is this something I need to manually setup?
Docker plugin is installed and enabled by default in this build of Teamcity.
This might be a Teamcity bug where the docker.server.osType is not being set when running windows containers in Docker Desktop for Windows (Windows Server 2016).
My original setup, I had Docker running Windows containers in my Teamcity Server/Agent machine running Windows Server 2016. I was expecting to use Docker Wrapper and run Docker image platform set to Windows (I realized that would not work with the node image since that is built under the Linux platform). However, my docker.server.osType should still be set to windows regardless and I should have passed the compatibility check.
What I did to get around this was to run linux containers in my Windows Server 2016 machine. Below are the steps I took to address this issue.
In the build agent, Docker Settings -> Daemon -> Check Experimental Features
In the builder server {TeamCityDirectory}\conf\teamcity-startup.properties -> add teamcity.docker.lcow.enabled = true
Switch docker to run linux containers
After doing that, I restarted my Build Agent and Build Server services, and the docker.server.osType in my Build Agent popped up to with value of linux. I then set my build step's Docker image platform to linux.

What are the dependencies for running containers on a system (linux)?

I am new to the world containers, docker, kubernetes and I am investigating requirements for implementing a my middleware distributed project. I took some key container courses with Docker and Kubernetes.
But I would like to ask for those who have more experience, in a production environment (or just execution and instantiation of modules, where each module would be a container) what would be the dependencies to execute a container?
Is it mandatory for me to have the dependency package for docker and docker itself installed for this? To just raise the pods and services with Kubernetes is it also mandatory to have kubectl installed on my host?
Note: For local development and deployment using google cloud I have already done some testing and I know it is necessary.
To Setup docker on your system you need below things
if you are going to setup K8s with docker
docker-ce/docker
kubelet
kubectl
curl & wget
if you are going to setup k8s with minikube
you will need minikube
virtualenv
I feel you need to be more specific what exactly you wanted to know.
There are multiple container technologies are existing currently. To install docker specifically your linux machine should have kernel version > 3.10.
If you want to install Kubernetes on your linux machines
you need to modify OS level things.(like firewall,swap etc)
you need to install one of the container run time & other kubernetes packages(kubelet kubeadm kubectl ) then setup container networking.
Here you can find clear instructions to install kuberentes via Kubeadm

What is the linux version of docker for mac k8s mode?

On a Mac, Docker has a built in kubernetes mode that helps you set up a dev cluster in 1 click. Is there a way to do with with Docker-CE on my linux laptop? If not, what is the recommended approach (seems weird that this is actually easier on a mac or windows lol)
To get the current OS version, try kubectl get nodes -o wide
If you're looking to run a local Kubernetes cluster, you should use Minikube: https://kubernetes.io/docs/getting-started-guides/minikube/

Docker client on Windows Subsystem for Linux (Ubuntu) mounts (near) empty directory

I have Windows 10 with Windows Subsystem for Linux installed (Bash on Ubuntu on Windows), have Docker installed on Windows, and a Docker client running on the linux subsystem per this walkthrough. All works well, however, when I want to be able to access a volume on my default mount "/mnt/c/../". I am using the mount flags at docker launch and have tried both:
docker run -v $PWD:/mount
docker run --mount type=bind,source="$(PWD)",target=/mount
and most variations shown here.
I have reason to think this is a permissions issue. When launching from the linux subsystem, there is always one empty folder from the original source directory. When launching from windows powershell, everything is fine. The only difference between the two would be the docker client being used.
I have shared C in the docker host settings in windows, however, do I need to do something similar for the client inside of windows subsystem for linux?
Versions:
Docker client: Docker version 18.03.0-ce, build 0520e24
Docker host: Docker version 18.03.0-ce-win59 (16762)
I had the same issue with the same set-up. After a lot of trial and error and googling, here is what resolved the issue:
Change Windows password to not include special characters.
Reset credentials for docker.
Worked! Weird bug.

How do i install puppet within a docker container? I have an Ubuntu14.04 OS

I have to install puppet open source in Docker i.e create a container with a master and another with a slave.Should i create a detached container(daemonized) that ran in the background?
I have an Ubuntu 14.04 OS.
A rule of thumb in docker containerization it to keep the container as lightweight as much as possible so deploying and installing stuff on containers using puppet is not recommended since you can just do the installations at the build using the Dockerfile.

Resources