coreos

systemd: “Environment” directive to set PATH

久未见 提交于 2019-12-04 15:54:34
问题 What is the right way to set PATH variable in a systemd unit file? After seeing a few examples, I tried to use the format below, but the variable doesn't seem to expand. Environment="PATH=/local/bin:$PATH" I am trying this on CoreOS with the below version of systemd. systemd 225 -PAM +AUDIT +SELINUX +IMA -APPARMOR +SMACK -SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT -GNUTLS -ACL +XZ -LZ4 +SECCOMP +BLKID -ELFUTILS +KMOD -IDN 回答1: You can't use EnvVars in Environment directives. The whole Environment=

Kubernetes dashboard keeps pending with message: no endpoints available for service “kubernetes-dashboard”

爱⌒轻易说出口 提交于 2019-12-04 13:34:46
Heeey all, I need some help with getting the dashboard to work. My dashboard pod has status "Pending" and if I do a curl call to http://127.0.0.1:8080/api/v1/proxy/namespaces/kube-system/services/kubernetes-dashboard then I get this result: "no endpoints available for service \"kubernetes-dashboard\"" { "kind": "Status", "apiVersion": "v1", "metadata": {}, "status": "Failure", "message": "no endpoints available for service \"kubernetes-dashboard\"", "reason": "ServiceUnavailable", "code": 503 } All pods core@helena-coreos ~ $ ./kubectl get po --namespace=kube-system NAME READY STATUS RESTARTS

Kubernetes simple authentication

孤街醉人 提交于 2019-12-04 13:06:50
I am using KUbernetes on a coreOs cluster hosted on DigitalOcean. And using this repo to set it up. I start the apiserver with the following line: /opt/bin/kube-apiserver --runtime-config=api/v1 --allow-privileged=true \ --insecure-bind-address=0.0.0.0 --insecure-port=8080 \ --secure-port=6443 --etcd-servers=http://127.0.0.1:2379 \ --logtostderr=true --advertise-address=${COREOS_PRIVATE_IPV4} \ --service-cluster-ip-range=10.100.0.0/16 --bind-address=0.0.0.0 The problem is that it accepts request from anyone! I want to be able to provide a simple user/password authentication. I have been

Docker: Nginx and php5-fpm dockers are not talking

こ雲淡風輕ζ 提交于 2019-12-04 08:28:32
问题 I’d like to make a fully dockerized Drupal install. My first step is to get containers running with Nginx and php5-fpm, both Debian based. I’m on CoreOS alpha channel (using Digital Ocean.) My Dockerfiles are the following: Nginx: FROM debian MAINTAINER fvhemert RUN apt-get update && apt-get install -y nginx && echo "\ndaemon off;" >> /etc/nginx/nginx.conf CMD ["nginx"] EXPOSE 80 This container build and runs nicely. I see the default Nginx page on my server ip. Php5-fpm: FROM debian

how to update docker in coreos

梦想与她 提交于 2019-12-04 08:19:25
问题 I typed docker version into a newly provisioned coreos instant on ec2 and I got this message Client version: 0.6.3 Go version (client): go1.1.2 Git commit (client): b0a49a3 Server version: 0.6.3 Git commit (server): b0a49a3 Go version (server): go1.1.2 Last stable version: 0.7.3, please update docker how do I update docker? 回答1: CoreOS and the tools it ships are updated automatically as new versions come out. The CoreOS version on the EC2 marketplace is always a few versions behind, but if

how to clean up docker overlay directory?

时光怂恿深爱的人放手 提交于 2019-12-04 07:43:54
问题 I'm running docker via CoreOS and AWS's ECS. I had a failing image that got restarted many times, and the containers are still around- they filled my drive partition. Specifically, /var/lib/docker/overlay/ contains a large number of files/directories. I know that docker-cleanup-volumes is a thing, but it cleans the /volumes directory, not the /overlay directory. docker ps -a shows over 250 start attempts on my bad docker container. They aren't running, though. Aside from rm -rf /var/lib

Java JVM on Docker/CoreOS

醉酒当歌 提交于 2019-12-04 07:16:07
I'm learning CoreOS/Docker and am trying to wrap my mind around a few things. With Java infrastructure, is it possible to use the JVM in it's own container and have other Java apps/services use this JVM container? If not, I'm assuming the JVM would have to be bundled in each container, so essentially you have to pull the Java dockerfile and merge my Java services; essentially creating a Linux Machine + Java + Service container running on top of the CoreOS machine. The only other thought I had was it might be possible to run the JVM on CoreOS itself, but it seems like this isn't possible.

Ansible won't let me connect through SSH

喜欢而已 提交于 2019-12-04 00:53:08
I'm trying to connect from one server to another. In fact I'm trying to connect to my host OS (CoreOS) from within a docker container. I have set up a RSA key and it works like a charm when using standard command line to connect to the remote host. It works as expected. When I'm trying to run ansible customercare -m ping --user=core --connection=ssh --private-key=/home/jenkins/.ssh/id_rsa I'm met with this error 10.45.1.107 | FAILED => SSH encountered an unknown error during the connection. We recommend you re-run the command using -vvvv, which will enable SSH debugging output to help diagnose

kubectl安装flannel

只愿长相守 提交于 2019-12-03 19:37:39
亲测采取github上的 flannel.yml 花式报错,采取如下flannel.yml文件即可: --- apiVersion: policy/v1beta1 kind: PodSecurityPolicy metadata: name: psp.flannel.unprivileged annotations: seccomp.security.alpha.kubernetes.io/allowedProfileNames: docker/default seccomp.security.alpha.kubernetes.io/defaultProfileName: docker/default apparmor.security.beta.kubernetes.io/allowedProfileNames: runtime/default apparmor.security.beta.kubernetes.io/defaultProfileName: runtime/default spec: privileged: false volumes: - configMap - secret - emptyDir - hostPath allowedHostPaths: - pathPrefix: "/etc/cni/net.d" - pathPrefix: "/etc

How to execute host's Docker command from container?

淺唱寂寞╮ 提交于 2019-12-03 16:18:30
I want to write Docker containers management script in Python. However, since I use CoreOS, Python is not included as standard command. So, I am thinking of using Python Docker container ( https://registry.hub.docker.com/_/python/ ) to execute my script. However, in that case the script will be executed in container's VM which doesn't have access to the host's Docker CLI. Is there a way to use Python (or other programming languages not packaged in CoreOS), to manage host environment without installing it on the host machine? PS, the script will do something like: docker run/rm/stop <another