kubernetes 部署 shadowsocks的问题


我用kubernetes部署shadowsocks虽然pod能够运行起来可是会报一些错误,还有客户端也无法进行连接
{
"kind": "Deployment",
"apiVersion": "extensions/v1beta1",
"metadata": {
    "name": "shadowsocks",
    "creationTimestamp": null
},
"spec": {
    "replicas": 1,
    "template": {
        "metadata": {
            "creationTimestamp": null,
            "labels": {
                "service": "shadowsocks"
            }
        },
        "spec": {
            "volumes": [],
            "containers": [{
                "command": [
                    "ss-server"
                ],
                "args": [
                    "-k testpassword", "-p 443", "-m aes-256-cfb"
                ],
                "name": "shadowsocks",
                "image": "hub.c.163.com/yswtrue/ss",
                "ports": [{
                    "containerPort": 443,
                    "protocol": "TCP"
                }],
                "resources": {},
                "securityContext": {
                    "privileged": true
                },
                "volumeMounts": []
            }],
            "restartPolicy": "Always"
        }
    },
    "strategy": {}
},
"status": {}
}


这是日志 kubectl logs shadowsocks-2846692085-49rke
2017-01-12 05:37:58 INFO: initializing ciphers...  aes-256-cfb
2017-01-12 05:37:58 ERROR: Invalid cipher name:  aes-256-cfb, use table instead
2017-01-12 05:37:58 INFO: port reuse enabled
2017-01-12 05:37:58 INFO: listening at *: 443


可是我用kubectl exec -it shadowsocks-2846692085-49rke bash
进入容器执行ss-server -k testpassword -p 443 -m aes-256-cfb

2017-01-12 05:41:26 INFO: initializing ciphers... aes-256-cfb
2017-01-12 05:41:26 INFO: port reuse enabled
2017-01-12 05:41:26 INFO: listening at *:443

就没有报错,请问视为什么呢

这是我的dockerfile

shadowsocks

#

VERSION 0.0.3

FROM ubuntu:16.10
MAINTAINER Dariel Dato-on <oddrationale@gmail.com>

RUN apt-get update && \
apt-get upgrade -y && \
apt-get install shadowsocks-libev -y

Configure container to run as an executable

ENTRYPOINT ["/usr/bin/ss-server"]


这是describe

kubectl describe pods shadowsocks-2846692085-49rke
Name:       shadowsocks-2846692085-49rke
Namespace:  default
Node:       gke-lltravel-test-default-pool-b42ec9a7-vf32/10.146.0.5
Start Time: Thu, 12 Jan 2017 13:37:40 +0800
Labels:     pod-template-hash=2846692085
    service=shadowsocks
Status:     Running
IP:     10.48.1.21
Controllers:    ReplicaSet/shadowsocks-2846692085
Containers:
shadowsocks:
Container ID:   docker://5011d4c53ffe354a5d374bbbea4ff37ce378d019c61ef9774f02b21020d60b6e
Image:      hub.c.163.com/yswtrue/ss
Image ID:       docker://sha256:fdcda5faa17ca0a1dbd4757ea9c91cc14ddbcc7f1e0865ccef8d433f961495a2
Port:       443/TCP
Command:
  ss-server
Args:
  -k testpasswd
  -p 443
  -m aes-256-cfb
Requests:
  cpu:      100m
State:      Running
  Started:      Thu, 12 Jan 2017 13:37:58 +0800
Ready:      True
Restart Count:  0
Volume Mounts:
  /var/run/secrets/kubernetes.io/serviceaccount from default-token-0cvhc (ro)
Environment Variables:  <none>
Conditions:
Type      Status
Initialized   True 
Ready     True 
PodScheduled  True 
Volumes:
default-token-0cvhc:
Type:   Secret (a volume populated by a Secret)
SecretName: default-token-0cvhc
QoS Class:  Burstable
Tolerations:    <none>
Events:
FirstSeen LastSeen    Count   From                    SubobjectPath           Type        Reason      Message
--------- --------    -----   ----                    -------------           --------    ------      -------
7m        7m      1   {default-scheduler }            Normal      Scheduled   Successfully assigned shadowsocks-2846692085-49rke to gke-lltravel-test-default-pool-b42ec9a7-vf32
7m        7m      1   {kubelet gke-lltravel-test-default-pool-b42ec9a7-vf32}  spec.containers{shadowsocks}    Normal      Pulling     pulling image "hub.c.163.com/yswtrue/ss"
7m        7m      1   {kubelet gke-lltravel-test-default-pool-b42ec9a7-vf32}  spec.containers{shadowsocks}    Normal      Pulled      Successfully pulled image "hub.c.163.com/yswtrue/ss"
7m        7m      1   {kubelet gke-lltravel-test-default-pool-b42ec9a7-vf32}  spec.containers{shadowsocks}    Normal      Created     Created container with docker id 5011d4c53ffe; Security:[seccomp=unconfined]
7m        7m      1   {kubelet gke-lltravel-test-default-pool-b42ec9a7-vf32}  spec.containers{shadowsocks}    Normal      Started     Started container with docker id 5011d4c53ffe
已邀请:

yswtrue

赞同来自:


还有我在本地直接用docker执行是没问题的

yswtrue

赞同来自:


发现问题了,我把dockerfile改成这个
https://github.com/shadowsocks ... lpine
然后把端口映射到8388就可以了。。应该是没有权限

要回复问题请先登录注册