Issue 1:
(Kubernetes 1.2)

Consider the following secret definition:

{
"kind": "Secret",
"apiVersion": "v1",
"metadata": {
"name": "rails"
},
"data": {
"db.conf": "cmVkYWN0ZWQK",
"dbdotconf": "cmVkYWN0ZWQK"
},
"type": "Opaque"
}

kubectl get secrets rails -o "jsonpath={.data['db.conf']}" returns:

error: error executing jsonpath "{.data['db.conf']}": db is not found

while kubectl get secrets rails -o "jsonpath={.data['dbdotconf']}" works.

Issue 2:
What keywords did you search in Kubernetes issues before filing this one? (If you have found any duplicates, you should instead reply there.): 'remove load balancer'

BUG REPORT

Kubernetes version (use kubectl version):

Client Version: version.Info{Major:"1", Minor:"3", GitVersion:"v1.3.7", GitCommit:"a2cba278cba1f6881bb0a7704d9cac6fca6ed435", GitTreeState:"clean", BuildDate:"2016-09-12T23:15:30Z", GoVersion:"go1.6.2", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"3", GitVersion:"v1.3.7", GitCommit:"a2cba278cba1f6881bb0a7704d9cac6fca6ed435", GitTreeState:"clean", BuildDate:"2016-09-12T23:08:43Z", GoVersion:"go1.6.2", Compiler:"gc", Platform:"linux/amd64"}

Environment:

Cloud provider or hardware configuration: Google Cloud (GKE)

OS (e.g. from /etc/os-release):

NAME="Alpine Linux"
ID=alpine
VERSION_ID=3.4.0
PRETTY_NAME="Alpine Linux v3.4"
HOME_URL="http://alpinelinux.org"
BUG_REPORT_URL="http://bugs.alpinelinux.org"

Kernel (e.g. uname -a):

Linux ga-redis-cache 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt25-2 (2016-04-08) x86_64 Linux

Install tools: Google Cloud SDK

Others:

What happened:

I have a service that I configured with an external load balancer with specific firewall rules.

apiVersion: v1
kind: Service
metadata:
name: ga-redis-cache
labels:
service: redis
purpose: cache
spec:
ports:
- port: 6379
protocol: TCP
selector:
service: redis
purpose: cache
type: LoadBalancer
loadBalancerSourceRanges:
# IP address changed for security; real IP address is routeable
- 192.168.1.1/32

We were ready to remove the external access so I changed the configuration to remove the load balancer:

apiVersion: v1
kind: Service
metadata:
name: ga-redis-cache
labels:
service: redis
purpose: cache
spec:
ports:
- port: 6379
protocol: TCP
selector:
service: redis
purpose: cache

And ran kubectl apply -f and got an error about an invalid port:

proto: no encoder for TypeMeta unversioned.TypeMeta [GetProperties]
proto: tag has too few fields: "-"
proto: no coders for struct *reflect.rtype
proto: no encoder for sec int64 [GetProperties]
proto: no encoder for nsec int32 [GetProperties]
proto: no encoder for loc *time.Location [GetProperties]
proto: no encoder for Time time.Time [GetProperties]
proto: no coders for intstr.Type
proto: no encoder for Type intstr.Type [GetProperties]
The Service "ga-redis-cache" is invalid.
spec.ports[0].nodePort: Invalid value: 30179: may not be used when `type` is 'ClusterIP'

What you expected to happen:

I expected Kubernetes to remove the load balancer from the service and convert back to internal balancing for access from the cluster only.

How to reproduce it (as minimally and precisely as possible):

See configuration files above.

Anything else do we need to know:

I tried this with another service and got repeated result, just a different port:

proto: no encoder for TypeMeta unversioned.TypeMeta [GetProperties]
proto: tag has too few fields: "-"
proto: no coders for struct *reflect.rtype
proto: no encoder for sec int64 [GetProperties]
proto: no encoder for nsec int32 [GetProperties]
proto: no encoder for loc *time.Location [GetProperties]
proto: no encoder for Time time.Time [GetProperties]
proto: no coders for intstr.Type
proto: no encoder for Type intstr.Type [GetProperties]
The Service "keylime-redis-cache" is invalid.
spec.ports[0].nodePort: Invalid value: 32537: may not be used when `type` is 'ClusterIP'